Background Task agent transcript files expire before orchestrator reads results

Resolved 💬 3 comments Opened Feb 23, 2026 by brian-wijaya Closed Feb 27, 2026

Description

Background agents launched via the Task tool have their JSONL transcript files cleaned up before the orchestrating agent can read results. TaskOutput returns "completed" with no content.

Reproduction

  1. Launch a background Task agent with run_in_background: true
  2. The agent completes its work and writes results
  3. Before the orchestrator reads the output, the transcript file at ~/.claude/projects/<project>/<session>/subagents/agent-<id>.jsonl is cleaned up
  4. TaskOutput returns "completed" but the content is empty

This happened 8/8 times across two overnight review sessions.

Expected behavior

Transcript files should persist until the orchestrating agent has read them, or at minimum until the parent session ends.

Environment

  • Claude Code CLI
  • Linux (Arch)

View original on GitHub ↗

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