Capture Claude Code background subagents into checkpoints

main

Commit

Soph3d ago

Claude Code runs most Agent calls in the background without the model passing run_in_background (or passes it as the string "true"), so the launch was classified as foreground, completed empty, and dropped. Its SubagentStop also carries agent_id but never tool_use_id, so even a recorded marker was never found.

Classify the launch from tool_response.status ("async_launched" / "completed"), which Claude Code reports authoritatively, falling back to run_in_background (boolean or boolean string). At SubagentStop, find the launch record by agent ID (preferring a live record, for resumed subagents) and adopt its tool_use_id. The integration harness now sends the payload shapes Claude Code 2.1.288 actually sends.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M41CCR54M4RSRGK11KB6A4ZZ

Checkpoints

Review Claude Code Background Subagents Checkpoints

PiGPT-6-astra
View session
Checkpoint 1

Capture Claude Code Background Subagents

Claude CodeOpus 5.5
View session
Checkpoint 1