Skip to content

Pull cord: keep every pause, end detached commands, name the parked agents - #549

Merged
lydakis merged 5 commits into
mainfrom
claude/project-thread-04ukom
Oct 31, 2026
Merged

lydakis merged 5 commits into
mainfrom
claude/project-thread-04ukom

Conversation

@lydakis

@lydakis lydakis commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Why

Follow-up to #534. George approved closing the gaps found when we compared the cord with andon and emergency-stop practice:

  • A pull and its resume should be history, not just notices that fade.
  • A pull should also stop detached commands.
  • The person should be able to see which agents a pull parked, and stop the one doing harm before resuming.

What changes

  • Every pause is kept. Schema 72 replaces the one-row pause table with pauses. The 71 to 72 migration carries over a pause that was holding.
    • A pause is now {id, reason, by, at_ms, parked}.
    • parked is {bots, total}: the agents whose running turns it parked (the first 64 by name) and how many in all.
    • A lifted pause also has resumed_by and resumed_ms.
    • The paused and resumed notices, ready, stats, and the pause/resume replies all carry this shape.
    • The daemon_paused tool result keeps the slim {reason, by, at_ms}.
  • A new pauses op (protocol 34) pages through pauses, held and lifted, oldest first:
    • Parameters: after, before, limit (1 to 256, default 64) and newest.
    • It returns {pauses, more}. A bad page gives invalid_pause_page.
    • agent pauses prints them.
  • A pull ends detached commands this daemon started, by killing the session each one leads. One started before a restart is no longer the daemon's to find; the docs say so. The shell tool description now says a daemon pause kills a detached command.
  • Sonny's pause banner names the parked agents: · 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

  • Runtime:
    • The main pause test checks parked names, resumed_by/resumed_ms, and the history after a restart.
    • New test_every_pause_is_kept_with_who_pulled_and_who_lifted_it covers paging, newest/before, and bad pages.
    • New test_a_pause_ends_the_detached_commands_agents_started.
    • New test_a_turn_a_pause_parked_can_be_stopped_before_the_resume: an interrupt ends a parked turn, and nothing runs on resume.
  • Store: schema_71_held_one_pause_and_forgot_it_when_lifted covers the migration, the next pause id, and history.
  • Sonny: the pause banner test covers the parked list and the Esc hint.
  • Local: Rust workspace tests (Sonny included), clippy, and the runtime suites test_runtime, test_cli, test_daemon, test_paced_park, test_lifecycle and test_wait.

…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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T19:49:40.968689Z 8f6a8e5 New commits
🔒 Security Review ✅ Completed 2026-10-31T18:51:02.932699Z 84f2b74 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/tools.rs Resolved
Comment thread src/store/db.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/tools.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/tools.rs Resolved
Comment thread src/tools.rs Resolved
@lydakis
lydakis merged commit 1413f05 into main Oct 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants