Stale background-task notifications keep re-firing in long sessions
Environment: Claude Code desktop app on Windows 11 (PowerShell/Git Bash), long-running orchestration session using background shells (run_in_background) to watch for subagent report files.
Symptom: Notifications from completed background shells arrive long after the watched condition is over, and keep trickling in as stale leftovers across subsequent turns. Example: a background watcher ("Watch for task X review report file") completes, but its completion notification surfaces turns later, interleaved with unrelated work — the model itself describes it as "the stale monitor finally clearing itself out." This repeats for each background watcher the session starts.
Expected: A background task's completion should notify once, promptly, on the turn boundary after it exits — not resurface later as stale events.
Impact: Noise in the transcript and wasted model turns re-checking state that was already resolved; in orchestration-heavy sessions (many parallel subagents + watchers) the leftovers accumulate.
🤖 Generated with Claude Code