Agent subagent results never delivered to parent in background job sessions
Bug
When running Claude Code as a background job (spawned via the daemon), agents spawned with the Agent tool never deliver their completion results back to the parent session. The parent blocks indefinitely on run_in_background: false, or never receives a completion notification for background agents.
Reproduction
- Start Claude Code as a background job (via the daemon or desktop app)
- Enter a worktree (
EnterWorktree) - Spawn any agent — even a trivial one:
````
Agent({ prompt: "Say hello and nothing else.", run_in_background: false })
- The agent spawns, runs, completes (visible in the tmux swarm view), and goes idle
- The parent session never receives the result — it blocks forever
Observed behavior
- The agent process starts and appears in
ps auxand the tmux swarm view - The agent completes its work (verified by viewing its tmux pane)
- An
idle_notificationteammate message is delivered to the parent, but the Agent tool's completion callback never fires run_in_background: falseblocks indefinitelyrun_in_background: true(default) never sends a completion notification
Expected behavior
The Agent tool should return the agent's final text output to the parent session when the agent completes.
Environment
- Claude Code v2.1.202
- macOS (Darwin 25.5.0, arm64)
- Running as a background job via the daemon
- Inside a git worktree (
.claude/worktrees/) - Tested with
logic-reviewer,security-reviewer,test-reviewer,nitpick-reviewer,general-purpose, and default agent types — all exhibit the same behavior - Tested across two separate attempts (8+ agents total including a trivial "say hello" agent) in the same session
Impact
This blocks any multi-agent workflow from a background job session. Skill workflows that spawn reviewer subagents become non-functional — agents complete but results are lost.
Workaround
None found. The only option is to not use subagents from background job sessions.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗