Subagent Transcript Cleanup Capability Pack Skill
Expert capability pack for reviewing Claude Code subagent transcript files, documented retention settings, compaction events, and summary handoff so verbose delegated work stays out of the main conversation.
Open the source and read safety notes before installing.
Safety notes
- Subagent transcripts may contain tool output with repository paths, credentials, or customer data.
- Resuming a subagent retains full prior tool history—confirm scope before continuing destructive work.
- This skill reviews transcripts; it does not delete files unless you explicitly apply documented retention settings.
Privacy notes
- Transcript jsonl files under ~/.claude/projects/ may include PII from read tools and MCP outputs.
- External summaries should describe categories of exposure, not paste raw transcript lines.
- Agent IDs in transcripts can correlate sessions—redact before sharing outside the team.
Prerequisites
- A completed or in-progress subagent delegation with a defined task boundary.
- Access to the local Claude Code project directory for transcript paths.
- Knowledge of whether the subagent should resume or start fresh.
Schema details
- Install type
- package
- Reading time
- 9 min
- Difficulty score
- 74
- Troubleshooting
- Yes
- Breaking changes
- No
- Scope
- Source repo
- Skill type
- capability-pack
- Skill level
- expert
- Verification
- validated
- Verified at
- 2026-06-16
| Platform | Support | Install path |
|---|---|---|
| claude-code | Native | .claude/skills/<skill-name>/SKILL.md |
| codex | Native | .agents/skills/<skill-name>/SKILL.md |
| windsurf | Native | .windsurf/skills/<skill-name>/SKILL.md |
| gemini | Native | .gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md |
| cursor | Adapter | .cursor/rules/<skill-name>.mdc |
| cli | Manual | AGENTS.md or tool-specific context file |
Full copyable content
# Trigger
"Apply the subagent transcript cleanup capability pack for this delegation."
# Required output
1) Delegation goal and expected summary for the main session
2) Transcript file location and agent ID inventory
3) Compaction and retention review notes
4) Resume versus fresh-instance recommendation
5) Privacy-safe handoff summaryAbout this resource
Knowledge Freshness
Grounded in Claude Code sub-agents and settings documentation verified on 2026-06-16. Transcript paths, retention defaults, and resume behavior can change between releases—confirm live docs before production policy decisions.
Retrieval Sources
- https://code.claude.com/docs/en/sub-agents
- https://code.claude.com/docs/en/skills
- https://code.claude.com/docs/en/features-overview
- https://code.claude.com/docs/en/settings
- https://github.com/anthropics/claude-code
- https://developers.google.com/search/docs/fundamentals/creating-helpful-content
Source Verification Notes
Verified against official sub-agents documentation on 2026-06-16:
- Subagents run in isolated context windows; verbose output can stay in the subagent while only a summary returns to the main conversation.
- Subagent transcripts are stored as
agent-{agentId}.jsonlunder~/.claude/projects/{project}/{sessionId}/subagents/. - Main conversation compaction does not affect subagent transcript files.
- Transcripts are cleaned up based on the
cleanupPeriodDayssetting (default 30 days). - Subagent auto-compaction logs
compact_boundaryevents in transcript files withpreTokensmetadata. - Resumed subagents retain full conversation history; built-in Explore and Plan agents are one-shot and return no agent ID to resume.
Scope Note
Community review skill—not a built-in Claude Code slash command. Applies documented transcript locations, retention settings, and handoff patterns from official sub-agents docs.
Core Workflow
- Before delegation, state what summary the main session needs (not raw logs).
- Run the subagent and record the agent ID when resumption may be required.
- Locate transcript files under the documented
subagents/path for the session. - Scan jsonl for
compact_boundaryevents and high-volume tool output. - Confirm
cleanupPeriodDaysin project settings matches team retention policy. - Decide resume (continue prior agent ID) versus a fresh subagent instance.
- Return only the agreed summary to the main conversation; keep verbose jsonl local.
- Produce a privacy-safe handoff note for reviewers.
Capability Scope
- Transcript path discovery using documented directory layout.
- Retention review against
cleanupPeriodDays. - Compaction event review in jsonl transcripts.
- Resume versus fresh-instance decision support.
- Summary handoff checklists for delegated work.
Compatibility
Native
- Claude Code: use when subagent delegation produces large tool output.
Manual Adaptation
- Generic AGENTS: apply retention and summary-handoff checklist for any delegated worker pattern.
Required Inputs
- Subagent name and task boundary.
- Session project path or session ID when locating transcripts.
- Whether the task is read-only exploration or write-capable work.
- Team retention policy for local Claude Code artifacts.
Production Rules
- Do not paste live secrets from jsonl transcripts into tickets or chat.
- Prefer summary handoff over copying full tool output into the main session.
- Confirm destructive tools were not invoked before resuming a subagent.
- When sharing externally, describe transcript categories—not raw file contents.
- Link only to official documentation in retrieval sources.
Review Matrix
| Check | Pass criteria | Doc basis |
|---|---|---|
| Summary defined | Main session receives agreed summary only | Isolated context handoff |
| Transcript located | Path matches documented subagents layout | Transcript file path |
| Retention aligned | cleanupPeriodDays matches policy | Automatic cleanup setting |
| Compaction reviewed | compact_boundary noted if present | Auto-compaction logging |
| Resume justified | Agent ID exists and scope is safe | Resume subagents section |
Output Contract
- Delegation goal and expected main-session summary.
- Transcript path and agent ID inventory.
- Compaction and retention findings.
- Resume versus fresh-instance recommendation.
- Privacy-safe handoff summary.
Troubleshooting
Issue: Cannot find transcript file
Fix: Confirm session ID and look under the documented subagents/ directory for agent-{agentId}.jsonl.
Issue: Main session still flooded with verbose output Fix: Redelegate with explicit instruction to return summary only; keep exploration in the subagent context.
Duplicate Check
Distinct from subagent-mcp-scoping-review-capability-pack (MCP inheritance),
subagent-foreground-background-delegation-capability-pack (delegation modes),
and pull-request-triage-capability-pack (maintainer PR workflows). This pack
covers transcript files, retention, compaction, and summary handoff.
Editorial Disclosure
Independent entry by kiannidev based on public Claude Code documentation. No
paid placement or affiliate links.
Source citations
Add this badge to your README
Show that Subagent Transcript Cleanup Capability Pack Skill is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/skills/subagent-transcript-cleanup-capability-pack)How it compares
Subagent Transcript Cleanup Capability Pack Skill side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | Subagent Transcript Cleanup Capability Pack Skill Expert capability pack for reviewing Claude Code subagent transcript files, documented retention settings, compaction events, and summary handoff so verbose delegated work stays out of the main conversation. Open dossier | Subagent Foreground Background Delegation Capability Pack Skill Expert subagent foreground background delegation capability pack for choosing when to run Claude Code subagents interactively versus in the background, coordinating parallel work, and returning summarized results safely. Open dossier | Subagent MCP Scoping Review Capability Pack Skill Expert subagent MCP scoping review capability pack for auditing which MCP servers and tools subagents inherit, restricting high-risk tools in delegated tasks, and preventing unintended production changes from background agents. Open dossier | Claude Code Deep Links Runbook Capability Pack Skill Expert Claude Code deep links runbook capability pack for building safe claude-cli:// URLs, embedding them in incident runbooks, and validating cwd, repo, and prompt parameters before users press Enter. Open dossier |
|---|---|---|---|---|
| Trust | ||||
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Category | skills | skills | skills | skills |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | kiannidev | kiannidev | kiannidev | kiannidev |
| Added | 2026-06-16 | 2026-06-14 | 2026-06-14 | 2026-06-13 |
| Platforms | Claude CodeCodexWindsurfGeminiCursorCLI | Claude CodeCodexWindsurfGeminiCursorCLI | Claude CodeCodexWindsurfGeminiCursorCLI | Claude CodeCodexWindsurfGeminiCursorCLI |
| Source repo | — | — | — | — |
| Safety notes | ✓Subagent transcripts may contain tool output with repository paths, credentials, or customer data. Resuming a subagent retains full prior tool history—confirm scope before continuing destructive work. This skill reviews transcripts; it does not delete files unless you explicitly apply documented retention settings. | ✓Background subagents reduce interactive oversight; do not use them for destructive edits, production deploys, or credential-handling tasks. Parallel background subagents multiply token cost and can race on the same files or external systems. Foreground subagents keep the parent waiting; overusing them erases the latency benefits of delegation. Subagents isolate context but still consume tokens in their own windows; unbounded parallel research can become expensive quickly. This skill recommends delegation modes; it must not spawn background subagents for high-risk tasks without explicit approval. | ✓Subagents operate in isolated context windows but may inherit MCP access from the parent configuration unless explicitly restricted. Background subagents can invoke write or execute MCP tools without the same interactive oversight as foreground work. Delegating production-impacting tasks to subagents does not reduce accountability for resulting changes. Removing MCP servers from the parent session before delegation is safer than assuming subagents ignore high-risk tools. This skill recommends scope reductions; it must not spawn subagents with broader MCP access than the reviewed plan allows. | ✓Deep links pre-fill prompts but never auto-send; users must press Enter after reviewing the external-link warning. Untrusted pages can craft malicious prompts; treat every deep link like untrusted input until a human reviews it. Prompts over 1,000 characters show an extended warning; require scroll review before sending long links. Network and UNC paths are rejected for cwd; use absolute local paths or repo slugs instead. If both cwd and repo are passed, cwd wins even when the path does not exist; validate parameters deliberately. Organizations can disable handler registration with disableDeepLinkRegistration in settings or managed policy. |
| Privacy notes | ✓Transcript jsonl files under ~/.claude/projects/ may include PII from read tools and MCP outputs. External summaries should describe categories of exposure, not paste raw transcript lines. Agent IDs in transcripts can correlate sessions—redact before sharing outside the team. | ✓Background subagent transcripts may accumulate sensitive file contents, customer examples, and internal URLs before summarization. Summaries returned to the parent session can still leak data if subagents paste raw tool output instead of redacted findings. Public delegation notes should describe mode choice and oversight level, not full subagent transcripts. | ✓Subagent MCP reviews may expose internal service names, database tools, and deployment integrations configured in the parent session. Delegated task descriptions and subagent transcripts can contain customer data returned by MCP read tools. Public summaries should describe scope categories and mitigations, not live MCP manifests or tool arguments. | ✓Deep link URLs embed prompt text in query parameters, which may expose incident details, customer names, or internal service names in browser history, chat logs, or ticketing systems. repo resolution uses the most recently used local clone path, which can reveal directory layout on shared screens via the welcome header. Runbooks pasted into GitHub-rendered Markdown lose clickable claude-cli:// links; code-block copies still expose full URLs to readers. Public runbooks should use redacted example prompts and generic repo slugs unless the audience is internal-only. |
| Prerequisites |
|
|
|
|
| Install | — | — | — | — |
| Config | — | — | — | — |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.