Repository navigation
Lead desk: deterministic queue watcher, cheap triage subagents, transferable docs - #112
Conversation
…ferable docs Built by an Opus 5 subagent to a spec from the lead; the spec named the wrong model in this trailer and the wrong test filename, both corrected here. WHY each piece exists: - Intents live in an in-memory Map in the daemon, so a restart destroys the queue with no message. The watcher reports a vanished intent as "vanished (daemon restart?)", never as a decision it did not witness. - Room confirmation cards are clipped at ~300 characters on one host, so the room is not a reliable source of the command being approved. The watcher reads /intents on the daemon and flags [CLIPPED?] on the full text. - "Daemon unreachable" and "queue empty" are different facts and are never rendered the same way; the process exits 3 when any daemon was unreachable. - Severity tie-break is most-restrictive-wins: AUTH-PATH > DESTRUCTIVE > CREDENTIAL > PAID > LEAD-OK. Classification is a lower bound. - Test file is test/lead_desk_test.py, a valid module name: unittest discover SILENTLY SKIPS filenames that are not identifiers and exits 0 with "NO TESTS RAN", which is a check that cannot fail. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe6822af1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| target = url.rstrip("/") + "/intents" | ||
| req = urllib.request.Request(target, method="GET", headers={"Accept": "application/json"}) |
There was a problem hiding this comment.
Allow polling authenticated confirmation daemons
When mcp.confirmations.auth_token is configured, src/confirmations.mjs applies its bearer-token check to every route, including GET /intents, but this request sends only an Accept header and exposes no way to supply authorization. Such daemons therefore always appear UNREACHABLE (HTTP 401), making the advertised fleet watcher unusable for secured hosts; accept a per-daemon token or another non-hardcoded credential source and send the bearer header.
Useful? React with 👍 / 👎.
| "clipped": looks_clipped(prompt), | ||
| "prompt_excerpt": excerpt(prompt), | ||
| "prompt_len": len(prompt), |
There was a problem hiding this comment.
Return the full prompt from the triage recovery command
When the lead-triage agent receives only the watcher line, its instructions tell it to rerun --once --json to obtain the full prompt, but each JSON row retains only this 100-character prompt_excerpt and the length. Consequently the documented recovery path still cannot inspect content after character 100 (or quote the deciding token as required), forcing escalation or an incomplete judgment for longer intents; include the original prompt in machine-readable output or provide a dedicated full-prompt lookup.
Useful? React with 👍 / 👎.
| name: room-steward | ||
| description: Read the last N room messages and flag breaches of the room rules - overlong posts, method detail that belongs in DM, re-litigated numbers, duplicate conclusions. Drafts a one-line nudge for the lead to send. Never posts anything itself. | ||
| model: haiku | ||
| tools: Bash, Read |
There was a problem hiding this comment.
Give room-steward access to the read-only room tool
For the documented invocation that passes a room name rather than copied messages, the agent is instructed to fetch mcp__ide-agent-kit__room_recent, but this frontmatter allowlist grants only Bash and Read. The subagent therefore cannot obtain the messages it is supposed to review in the normal <ROOM> workflow; add the read-only room-recent tool to the allowlist while continuing to exclude write routes.
Useful? React with 👍 / 👎.
Adds a deterministic queue watcher (
scripts/lead-desk.py), two cheap triage subagents (.claude/agents/lead-triage.md,.claude/agents/room-steward.md) and transferable docs (docs/lead-desk.md).Why each piece exists, from the commit message:
/intentson the daemon and flags[CLIPPED?]on the full text.Verified: 29 tests in
test/lead_desk_test.py.Trap the commit calls out, worth knowing before anyone renames the file: the test file must be
test/lead_desk_test.py, a valid module name.unittest discoverSILENTLY SKIPS filenames that are not identifiers and exits 0 with "NO TESTS RAN" - a check that cannot fail.Built by an Opus 5 subagent to a spec from the lead; the spec named the wrong model in its trailer and the wrong test filename, both corrected in this branch.
🤖 Generated with Claude Code