Task Agent Output Files Empty (TaskOutputTool regression) - 20M+ tokens wasted

Resolved 💬 2 comments Opened Jan 10, 2026 by LEGACYENGINE Closed Jan 10, 2026

Summary

I'm having trouble retrieving results from background Task agents. The output files are empty (0 bytes), and I'm not sure if this is expected behavior or if I'm using the wrong approach.

Version: 2.1.3
Platform: Windows 11

---

What I'm Seeing

When I launch a Task agent (general-purpose subagent), it completes successfully, but:

  • The .output file in temp directory is 0 bytes
  • TaskOutput tool returns "success" but no content
  • The agent transcript IS saved in ~/.claude/projects/.../subagents/agent-{id}.jsonl

Background Bash tasks work fine - their output files have content.

---

What I Tried

  1. TaskOutput with block: true → Returns success, no content
  2. Read tool on the output file → Empty
  3. Resuming the agent → Works, but seems indirect

---

Question

After the change from AgentOutputTool/BashOutputTool to unified TaskOutputTool, what's the correct way to retrieve Task agent results?

Am I using the wrong approach, or is there a bug with agent output file population?

---

File Evidence

Bash task output:  /tasks/b4b8e7c.output → 58,145 bytes ✓
Agent task output: /tasks/ad21e0c.output → 0 bytes
Agent jsonl:       agent-ad21e0c.jsonl   → 66 MB of content

The agent clearly ran and captured data - I just can't retrieve it through the output file mechanism.

View original on GitHub ↗

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