Repository navigation
Pull cord: running turns park on a pull and continue on resume - #534
Conversation
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. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ad97ab9cd
ℹ️ 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".
|
@codex security review This PR's one automatic security review failed on the usage limit. Tracked in #531 as riskier: daemon turn lifecycle, where a pulled cord parks running turns and resume continues them, so killed tool calls must never run again. Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
6ad97ab to
297462b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 297462b534
ℹ️ 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 pull used to end every running turn as interrupted, and nothing started them again on resume. Now each parks at once as a closed pool parks it (status paced, `turn_paced` with `paused: true` and no `resume_at_ms`), and its wake-up waits for `resume`, across restarts too. Each call it had not answered gets a `daemon_paused` result saying the pause stopped it (it may have had effects) or came before it ran, with the pause; none is run again, as Codex answers the calls an interrupt cut off. A background command the pull ends says the same on its handle. The pause is not counted as paced time, and the pause reply counts `parked`, not `interrupted`. Sonny says "Paused" for such a turn. Protocol 31; no schema change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
…rk that committed as the pull landed stays Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
… bounded on pause and resume A park of the turn's own that committed as the pull cancelled its task now has its wake-ups registered by the task, as a restart registers a parked turn's: a pool's time, a verdict or answer looked at again, or a wait's handles and the round's next lapse. `by` on `pause` and `resume` is 1 to 128 bytes, as a verdict's is, answering `invalid_by` otherwise: it is told to every session. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHSbKZDm7SFtpZarEA
c71fcdc to
3eb2b41
Compare
Why
A pull used to end every running turn as
interrupted(daemon_paused), and nothing restarted them onresume. George picked "park on pull, continue on resume" and approved the design.What changes
paced, with aturn_pacedevent{"resume_at_ms": null, "paused": true}. It holds no slot and its wake-up waits forresume, across restarts too. The reply it was writing is requested again when it continues, from the whole model-call boundary (compaction included).store::close_unanswered, whichfinishnow shares. The result is{"error":"daemon_paused","detail":…,"pause":{reason,by,at_ms}}, stated as facts only, persrc/AGENTS.md:answersrows are removed. Eachapprove_stepa closed call had asked is denied withstep_decided, asend_stepsdoes.suspend,suspend_answer,suspend_approval) stays as it parked. The task registers that park's wake-ups as a restart would (Turn::rejoin): a pool's time, a verdict or answer looked at again, or a wait's handles plus the round's next lapse.interruptafter a pull still ends the turn.INTERRUPTEDcan replace a pendingPAUSED; nothing else can.paced_ms. This is tracked byWaiting.pulledin the JSONwaitingcolumn, so there is no schema change. The turn view'swaiting_onreads{"resume_at_ms": null, "paused": true}.parkedinstead ofinterrupted.byonpauseandresumeis limited to 1 to 128 bytes (invalid_by), the same limit a verdict'sbyhas, since every session is told it. This fixes the open finding from Sonny: the sky shows the andon cord, who pulled it and who let the line go on #528./pausesays "N running wait for /resume".Docs: RUST_PROTOTYPE pause section and event list, SONNY.md, sonny README, FEATURES row, CLI help.
Tests
test_a_pause_stops_every_agent_until_resume_across_restarts:resume, withpaced_msunder 300 ms.byis refused on both ops, and the pause still holds.test_a_pause_stops_a_running_command_and_the_turn_goes_on_without_rerunning_it: a runningshellcall gets thedaemon_pausedresult with the pause reason. The turn completes on resume, and the command's side effect happened exactly once.an_interrupt_supersedes_a_pause_and_nothing_relabels_an_interrupt.🤖 Generated with Claude Code