claude-code driver: read-only Monitor liveness probe (already-alive / monitor-not-started / resume-without-monitor) gating dispatch
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- bash, shell, sqlite
- Domain
- cli, developer-experience, devtools
Research direction
Start from the claude-code driver, SessionStart hook, and watch.sh as described: add a read-only probe that matches the current session id to the live watcher and returns already-alive, monitor-not-started, or resume-without-monitor without spawning, killing, or changing read_at. Gate dispatch in the hook and claude-code template until a fresh probe reports already-alive; keep it distinct from the unread-count notice in issue 1294. Done when the three local cases (stopped watcher, other session, healthy) return the three states and processes plus read state are untouched.
Written by the indexing model from the issue text.
Description
Context. agmsg v1.3.0 (3fc7d2b), Claude Code + Codex (resident Codex workers under systemd, Codex Desktop as a leader), one team of 5–6 seats across two machines (Linux headless + Windows). We carry this as a local patch on top of the release and re-apply it on every install.sh --update; filing it here so it can become an upstream contract instead. Happy to send a PR if the direction is welcome.
Problem. After a resume (--continue / /clear), the session's context still contains an old "Monitor started" line, so the agent assumes it is receiving while the watch.sh process is actually gone. Messages then queue silently until someone notices. The SessionStart hook cannot tell the agent whether this session's watcher is alive right now; it only re-emits the directive.
Proposal. A read-only liveness probe that matches the session id against the real watcher process and returns one of three states: already-alive, monitor-not-started, resume-without-monitor. The SessionStart hook (and the claude-code template) surface that state as a hard gate before any dispatch: "Dispatch is BLOCKED until the Monitor task is started and a fresh probe reports already-alive." The probe must not change read state, must not spawn or kill anything, and must be distinct from the unread-count notice (#1294).
Acceptance we use locally. Three cases — watcher stopped, watcher belonging to a different session, watcher healthy — return three different states; the probe leaves processes and read_at untouched.
Relation to the agmsgd RFC. Overlaps with the daemon's single diagnostic endpoint. Once the daemon exposes an equivalent answer for a session we would drop this; the ask is only that the state be queryable and gated on, whichever process answers.
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 156
- Avg merge
- 13h 56m
- Merged PRs (30d)
- 186
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fujibee/agmsg
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
[P2] app: peer-message previews pass C0/DEL control bytes to pty_injectPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
blocked
Difficulty 1/5 Under an hour Newbie friendliness 73/100
fullsend-ai/agents#1908 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
5700模组网络优先级问题Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
luainkernel/lunatik#2372 ·
Maintainers usually reply within 1 day