Status update (2026-05-08)
The main Phase C work for this issue has landed through #3684 and follow-ups:
One important correctness gap remained for subagent usage: when a subagent started a monitor, monitor notifications were routed to the parent agent instead of the subagent that owned the monitor. That is tracked by #3925 and fixed in #3933.
After #3933 merges, this issue's core requirement — long-running monitor output being pushed back to the agent that started the monitor — should be covered for top-level agents, foreground/background subagents, forked agents, and resumed background agents.
Explicitly not treated as a blocker for this issue: extending send_message to monitor entries. Per the #3634 roadmap discussion, monitor/shell entries do not currently have a receiver-side message protocol, so send_message remains agent-only in v1. task_stop already covers monitor cancellation.
Recommended closure condition: close this issue once #3933 is merged.
Parent
Phase C from the background task management roadmap: #3634
Motivation
Today the agent has no way to run a long-lived watcher (tail -F, inotifywait, polling loops) and receive events back asynchronously. It either blocks the turn with a foreground bash or fire-and-forgets a background shell. The event monitor fills this gap: a new Monitor tool whose stdout lines push events back to the agent with sensible throttling.
Scope
Core (no PR dependencies — can start now)
Follow-up (gated on #3471 / #3488 landing)
- Wire monitor entries into unified pill / dialog /
task_stop (~100-200 LOC)
BashTool ergonomics: detect tail -f / polling-loop intents and suggest Monitor instead
Design points
Per the aligned design in #3634:
BackgroundTaskEntry with kind: 'monitor'
- Same
task_stop cancellation path (follow-up)
- Same
send_message steering path where applicable (follow-up)
- Unified transcript path:
<projectDir>/tasks/<sessionId>/monitor-<id>.jsonl
- Two-layer PR cleavage: core plumbing PR + per-kind UI integration follow-up
Related
Status update (2026-05-08)
The main Phase C work for this issue has landed through #3684 and follow-ups:
Monitortool,MonitorRegistry, throttled stdout/stderr event notifications, idle/max-event self-stop, and themonitortask kind.Monitor(...)permission namespace.One important correctness gap remained for subagent usage: when a subagent started a monitor, monitor notifications were routed to the parent agent instead of the subagent that owned the monitor. That is tracked by #3925 and fixed in #3933.
After #3933 merges, this issue's core requirement — long-running monitor output being pushed back to the agent that started the monitor — should be covered for top-level agents, foreground/background subagents, forked agents, and resumed background agents.
Explicitly not treated as a blocker for this issue: extending
send_messageto monitor entries. Per the #3634 roadmap discussion, monitor/shell entries do not currently have a receiver-side message protocol, sosend_messageremains agent-only in v1.task_stopalready covers monitor cancellation.Recommended closure condition: close this issue once #3933 is merged.
Parent
Phase C from the background task management roadmap: #3634
Motivation
Today the agent has no way to run a long-lived watcher (
tail -F,inotifywait, polling loops) and receive events back asynchronously. It either blocks the turn with a foreground bash or fire-and-forgets a background shell. The event monitor fills this gap: a newMonitortool whose stdout lines push events back to the agent with sensible throttling.Scope
Core (no PR dependencies — can start now)
Monitortool: long-running script, stdout lines pushed back to the agent via feat: background subagents with headless and SDK support #3076'stask_notificationframeworkMonitorRegistry: independent registry mirroring the lifecycle shape ofBackgroundShellRegistry(feat(core): managed background shell pool with /tasks command #3642) —running/completed/failed/cancelled, AbortController, output capturemonitorFollow-up (gated on #3471 / #3488 landing)
task_stop(~100-200 LOC)BashToolergonomics: detecttail -f/ polling-loop intents and suggestMonitorinsteadDesign points
Per the aligned design in #3634:
BackgroundTaskEntrywithkind: 'monitor'task_stopcancellation path (follow-up)send_messagesteering path where applicable (follow-up)<projectDir>/tasks/<sessionId>/monitor-<id>.jsonlRelated
task_notificationframework (merged)task_stop/send_message)