Repository navigation
Pull cord: keep every pause, end detached commands, name the parked agents - #549
Conversation
…gents
A pull and its resume are now history the store keeps: schema 72 replaces
the one-row `pause` table with `pauses`, each with an id, whose running
turns it parked ({bots, total}, the first 64 by name), and once lifted who
lifted it and when. The `pauses` op (protocol 34) and `agent pauses` page
through them.
A pull also ends the detached commands this daemon started, killing the
session each leads.
Sonny's pause banner names the agents the pull parked, and in one of
their windows says Esc ends that agent's turn, so the one doing harm can
be stopped before /resume.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
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: 84f2b7446f
ℹ️ 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".
A page of pauses stops at half a reply's bytes, as bot pages do, so a history of long reasons never turns a page into response_size_limit. A detached command that leaves work running in its process group and exits (`cmd &`) no longer frees it from the pull: the group is looked for each second until empty, and a pull kills it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49de50400f
ℹ️ 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".
bubblewrap starts the namespace's init in a session of its own and, for a detached command, leaves it running when bubblewrap dies, so killing the wrapper's group left the command running. A pull now also kills that init, the wrapper's child, which ends every process in the pid namespace. A daemon shutdown still leaves it running. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10645a72ac
ℹ️ 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".
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
… them Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
Why
Follow-up to #534. George approved closing the gaps found when we compared the cord with andon and emergency-stop practice:
What changes
pausetable withpauses. The 71 to 72 migration carries over a pause that was holding.{id, reason, by, at_ms, parked}.parkedis{bots, total}: the agents whose running turns it parked (the first 64 by name) and how many in all.resumed_byandresumed_ms.pausedandresumednotices,ready,stats, and thepause/resumereplies all carry this shape.daemon_pausedtool result keeps the slim{reason, by, at_ms}.pausesop (protocol 34) pages through pauses, held and lifted, oldest first:after,before,limit(1 to 256, default 64) andnewest.{pauses, more}. A bad page givesinvalid_pause_page.agent pausesprints them.shelltool description now says a daemon pause kills a detached command.· parked calc.a, shop.b, web.c +3. In a parked agent's own window it adds· Esc ends this one, and Esc interrupts that agent's parked turn before/resume.Docs: RUST_PROTOTYPE pause section, SONNY.md, sonny README, FEATURES row, CLI help.
Tests
parkednames,resumed_by/resumed_ms, and the history after a restart.test_every_pause_is_kept_with_who_pulled_and_who_lifted_itcovers paging,newest/before, and bad pages.test_a_pause_ends_the_detached_commands_agents_started.test_a_turn_a_pause_parked_can_be_stopped_before_the_resume: an interrupt ends a parked turn, and nothing runs on resume.schema_71_held_one_pause_and_forgot_it_when_liftedcovers the migration, the next pause id, and history.