[Bug] Task/Agent tool returns missing result when plan-implementer subagent completes work

Resolved 💬 3 comments Opened Apr 20, 2026 by BJClark Closed May 26, 2026

Bug Description
The recurring issue is "Tool result missing due to internal error" when delegating phases to the plan-implementer subagent via the Task/Agent tool.

It's happened twice in the same session:

  • Phase 5 (System tests → Capybara): subagent dispatched, no report returned. Had to recover by checking git status — found uncommitted WIP from the

prior run, then had a second subagent finish/commit it (landed as 1c5b119).

  • Phase 6 (Controller/command over-mocking cleanup): same failure mode. Subagent dispatched, tool result came back as an internal error, no report.

The failure mode looks like the subagent is doing work (modifying files) but the response channel back to the orchestrator is failing, so we lose
visibility into what was done. Recovery path both times is the same: git log --oneline + git status on the feature branch to see what actually landed,
then either re-delegate a "review and finish WIP" task or accept the state and move on.

Not clear whether the root cause is a subagent-side crash, a large response payload exceeding a limit, a transport/timeout issue, or something else —
there's no error message surfaced beyond the generic "internal error" line.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.114
  • Feedback ID: f43ac759-8116-4b70-bc45-853343401e22

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/willclark/.local/share/claude/versions/2.1.114 (expected in multi-process scenarios)\n    at sd_ (/$bunfs/root/src/entrypoints/cli.js:2751:2177)\n    at WH8 (/$bunfs/root/src/entrypoints/cli.js:2751:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-19T22:15:01.534Z"},{"error":"McpToolCallError: Discrepancy between issue team and state, cycle or project - Discrepancy between issue team and state, cycle or project.\n    at CJ7 (/$bunfs/root/src/entrypoints/cli.js:4759:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-19T22:30:40.714Z"},{"error":"MaxFileReadTokenExceededError: File content (480713 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at nj7 (/$bunfs/root/src/entrypoints/cli.js:4723:12550)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-19T23:18:28.116Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (31 -> 31 messages). Message structure: [0] user; [1] assistant(id=msg_01RLCJmCfuBkKHCMaTPs9THn, tool_uses=[toolu_011zUFp31dzuneUHZwPTuiDj]); [2] user(tool_results=[toolu_011zUFp31dzuneUHZwPTuiDj]); [3] assistant(id=msg_01JSYmjc5eUT9JFryVDdhUXB, tool_uses=[toolu_016j3QQWBYLXR5LFawq61sHu]); [4] user(tool_results=[toolu_016j3QQWBYLXR5LFawq61sHu]); [5] assistant(id=msg_01Mc1Efw4Vib98KoVE8tsz4G, tool_uses=[toolu_01B1nBpTEpS3ruD2nxkvvM8c]); [6] user(tool_results=[toolu_01B1nBpTEpS3ruD2nxkvvM8c]); [7] assistant(id=msg_015vzXEPN6t5rrrLPfZec6qk, tool_uses=[toolu_01QakF3oYuw8mkxYJf491Tm9]); [8] user(tool_results=[toolu_01QakF3oYuw8mkxYJf491Tm9]); [9] assistant(id=msg_01J2bq3DydW3gvrDDSZio4XQ, tool_uses=[toolu_01VPQxBkfZyK8Ar6U3FoBAAH]); [10] user(tool_results=[toolu_01VPQxBkfZyK8Ar6U3FoBAAH]); [11] assistant(id=msg_01KzmK5NnCZ1DtnB1m9ZZ5AH, tool_uses=[toolu_01Ky94jdJb5ADwWiP2wLEStU]); [12] user(tool_results=[toolu_01Ky94jdJb5ADwWiP2wLEStU]); [13] assistant(id=msg_01CysnDghARwv6LpuKTBCEf2, tool_uses=[toolu_019KdciWm4jPkXKbHHdpkkwc]); [14] user(tool_results=[toolu_019KdciWm4jPkXKbHHdpkkwc]); [15] assistant(id=msg_018a5Fs2Y69vkff1uyU8woV1, tool_uses=[]); [16] user; [17] assistant(id=msg_01WTV2KQcb8QvrCnCpmz3Mqi, tool_uses=[toolu_01RnfW9Y3kM5EvEXQfBDNdMQ,toolu_01LtrTMaX3A3tVeB5opMXWtB]); [18] user(tool_results=[toolu_01RnfW9Y3kM5EvEXQfBDNdMQ,toolu_01LtrTMaX3A3tVeB5opMXWtB]); [19] assistant(id=msg_01EtP1kEDRGHisWkbzTWM1DN, tool_uses=[toolu_0161V7Cx4Fk4vrbkmfAzLHDH]); [20] user(tool_results=[toolu_0161V7Cx4Fk4vrbkmfAzLHDH]); [21] assistant(id=msg_01LZE8CNYdth6yKVmBmuxLqL, tool_uses=[toolu_01LKN4gXZW9D4x4zZnXQKDAV]); [22] user(tool_results=[toolu_01LKN4gXZW9D4x4zZnXQKDAV]); [23] assistant(id=msg_018rAGY7wsG6kFy1zp7zQ77v, tool_uses=[toolu_01F6CQ4MxvSdBc2RMuyzpq7g]); [24] user(tool_results=[toolu_01F6CQ4MxvSdBc2RMuyzpq7g]); [25] assistant(id=msg_01HZSXyrKBmx8USc9Md8UjKx, tool_uses=[toolu_012We6rh7AfG4N5JDac3vmCc]); [26] user(tool_results=[toolu_012We6rh7AfG4N5JDac3vmCc]); [27] assistant(id=msg_016DVVr92LbVGs6toJk9bcCb, tool_uses=[toolu_01ARoKaXYaAq3Rcy5S4wHRWg]); [28] user(tool_results=[toolu_01ARoKaXYaAq3Rcy5S4wHRWg]); [29] assistant(id=msg_016Y46rfcRo1PWNfgCthRSit, tool_uses=[toolu_01Bn4XPEBBenwjNatqvDaebm]); [30] user\n    at yX7 (/$bunfs/root/src/entrypoints/cli.js:5225:10250)\n    at Hc7 (/$bunfs/root/src/entrypoints/cli.js:8064:15579)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T02:37:33.817Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (95 -> 95 messages). Message structure: [0] user; [1] assistant(id=msg_019a1XmeJcKa4AUXp6TPx66r,…

Note: Content was truncated.

View original on GitHub ↗

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