Feature: Option to separate subagent transcripts from parent session

Resolved 💬 4 comments Opened Mar 26, 2026 by tani-soui Closed Apr 25, 2026

Problem

When using the Agent tool to spawn subagents, all subagent activities (tool calls, responses, intermediate reasoning) are recorded in the parent session's transcript. This makes it very difficult to:

  1. Resume sessions: When using claude --resume, the session list becomes cluttered with entries that are mostly subagent logs rather than the user's main conversation
  2. Navigate conversation history: The actual user-agent dialogue is buried under dozens/hundreds of subagent tool calls
  3. Manage context: Large subagent transcripts consume context window space during compaction

This is especially problematic when using parallel subagents (e.g., 8 agents running simultaneously for code implementation), which can generate hundreds of tool calls in a single session.

Current Behavior

All subagent activities are embedded inline in the parent session's transcript JSONL file. There is no way to opt out of this.

Parent session transcript:
  - User message
  - Assistant response
  - Agent tool call (spawns subagent)
    - [100+ subagent tool calls recorded here]
  - Agent result
  - User message
  ...

Proposed Solution

Add an option to store subagent transcripts in separate files, with only a summary/reference in the parent session:

Parent session transcript:
  - User message
  - Assistant response
  - Agent tool call → subagent_id: abc123 (transcript: separate file)
  - Agent result: "Completed successfully"
  - User message
  ...

Separate file: subagents/abc123.jsonl
  - [All subagent tool calls here]

Possible implementations:

  1. Agent tool parameter: Agent(separate_transcript: true) to opt-in per invocation
  2. Settings option: "subagentTranscriptMode": "separate" | "inline" in settings.json
  3. Automatic: Always separate when run_in_background: true

Use Case

I'm building a system where Claude Code orchestrates 8+ parallel subagents for code implementation (TDD workflow with separate agents for each module). Each subagent performs 10-20 tool calls. A single orchestration session generates 100+ subagent tool calls, making it nearly impossible to find and resume the parent conversation later.

Environment

  • Claude Code version: 2.1.76+
  • OS: WSL2 (Ubuntu)
  • Usage pattern: Multi-agent orchestration with Agent tool + run_in_background

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗