Report
Reported by a community user (@gorosann1234) on X: https://x.com/gorosann1234/status/2068256436325634166
A Claude Code agent frequently reports that the monitor "died" / "there was no notification from the monitor," especially during long or "bad" stretches. In healthy stretches, multiple Claude sessions message each other fine; in bad stretches the monitor drops often, incoming messages stop being auto-delivered, and the agent falls back to manual checks — which the user finds unreliable.
Concrete signature (from a shared screenshot, transcribed — image not attached)
The agent repeatedly finds its persistent agmsg inbox stream Monitor task gone from the TaskList (it observes "the task list is empty"), relaunches it, and notes that a manual /agmsg inbox pull still catches every message — so messages are not lost, but the push channel (the Monitor task) keeps terminating. The agent eventually gives up on Monitor and switches to pulling the inbox manually each turn ("Monitor is "nice to have", I'll restart it but rely on manual pulls").
So the failure mode is the Monitor task ending mid-session, not (necessarily) message loss.
Candidate causes
Reproduced internally (2026-06-20)
A leader session's monitor went silent for several messages. Root cause was a duplicate orphan watcher for the same session_id advancing the shared watermark (#127 / #66) plus a stale post-rename subscription (#72). Killing the orphan + relaunching the Monitor recovered. So "monitor down" is often a starved / superseded watcher, not a crash — which matches the report (messages still pullable manually).
Next steps
Need from the reporter
agmsg version, delivery mode (monitor / both), Claude Code CLI vs Desktop app, and whether it correlates with /clear, multiple concurrent sessions, or actas / rename.
Report
Reported by a community user (@gorosann1234) on X: https://x.com/gorosann1234/status/2068256436325634166
A Claude Code agent frequently reports that the monitor "died" / "there was no notification from the monitor," especially during long or "bad" stretches. In healthy stretches, multiple Claude sessions message each other fine; in bad stretches the monitor drops often, incoming messages stop being auto-delivered, and the agent falls back to manual checks — which the user finds unreliable.
Concrete signature (from a shared screenshot, transcribed — image not attached)
The agent repeatedly finds its persistent
agmsg inbox streamMonitor task gone from the TaskList (it observes "the task list is empty"), relaunches it, and notes that a manual/agmsginbox pull still catches every message — so messages are not lost, but the push channel (the Monitor task) keeps terminating. The agent eventually gives up on Monitor and switches to pulling the inbox manually each turn ("Monitor is "nice to have", I'll restart it but rely on manual pulls").So the failure mode is the Monitor task ending mid-session, not (necessarily) message loss.
Candidate causes
watch.shis chatty or re-emits, the task gets killed — prime suspect for "frequent in bad mode."watch.shself-exit when the owning session looks not-alive (watch.sh: self-exit when owning CC session is no longer alive #67, open).session_idracing or starving the live one (watch.sh: multi-Monitor-invocation leaks duplicate watchers under same session_id #66; watch.sh: orphaned watcher advances shared watermark after its Monitor consumer dies → messages silently dropped from stream #127 → fixed by fix: Stop orphaned watch.sh from advancing the shared watermark past undelivered messages #145)./clear, resume) running the dedupTaskStopand not relaunching cleanly.Reproduced internally (2026-06-20)
A leader session's monitor went silent for several messages. Root cause was a duplicate orphan watcher for the same
session_idadvancing the shared watermark (#127 / #66) plus a stale post-rename subscription (#72). Killing the orphan + relaunching the Monitor recovered. So "monitor down" is often a starved / superseded watcher, not a crash — which matches the report (messages still pullable manually).Next steps
watch.shoutput, one watcher persession_id(kill duplicates at launch), and have superseded watchers exit cleanly rather than starving the live one (watch.sh: multi-Monitor-invocation leaks duplicate watchers under same session_id #66 / watch.sh: self-exit when owning CC session is no longer alive #67 / watch.sh: orphaned watcher advances shared watermark after its Monitor consumer dies → messages silently dropped from stream #127).turn/bothfallback actually fire when the monitor degrades, so the user doesn't depend on the agent remembering to pull manually.Need from the reporter
agmsg version, delivery mode (
monitor/both), Claude Code CLI vs Desktop app, and whether it correlates with/clear, multiple concurrent sessions, oractas/ rename.