Background subagent completion notifications are delayed until user interaction
Resolved 💬 3 comments Opened Mar 26, 2026 by marcospgp Closed May 11, 2026
Description
When running background subagents (via the Agent tool with run_in_background: true), the <task-notification> completion messages do not arrive in real-time. Instead, they accumulate silently and only get delivered when the user interrupts the conversation (e.g., pressing Escape twice or sending a new message).
Steps to reproduce
- Launch a background subagent via the Agent tool
- Wait for it to complete (the subagent finishes its work and writes its result)
- Observe that no
<task-notification>is delivered to the main conversation - Press Escape twice (interrupt) or send a new message
- Multiple queued
<task-notification>messages arrive at once
Expected behavior
<task-notification> messages should arrive immediately when the subagent completes, without requiring user interaction to flush them.
Impact
This causes the main agent to miss completions, fail to present results to the user promptly, and accumulate stale work. The user has to manually "kick" the conversation to receive updates, which breaks the async workflow.
Environment
- Claude Code version: 2.1.81
- OS: macOS Darwin 25.2.0
- Shell: zsh
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗