Repository navigation
Approve each call an exec script makes, as Codex does, instead of the script - #393
Conversation
…s installed Links, files and pages opened through xdg-open alone, so a Linux machine without it showed only the spawn error. The open crate tries the openers a desktop may have (xdg-open, gio, wslview and the rest); when none is there, the link goes on the clipboard and the notice says so. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Sonny declared its tools on a bot only when the bot's window opened, so an agent no one opened after an upgrade, such as a task out of sight, kept the tools it was made with and never got exec. When the lookout starts, it brings every agent Sonny declared on up to this build's tools, as opening its window would: a lead stays a lead, a new gated tool is gated as the bot's mode gates the rest, and a busy agent is tried again each minute. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
A request signed before the machine slept and received minutes later is refused as expired, and the turn failed for good. A 401 or 403 whose x-amzn-ErrorType is one of the clock-skew codes the AWS SDK for Java retries now retries at once as provider_signature_expired, and the retry is signed with the time then, as every attempt already is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
An agent another client made could share a tool's name with one of Sonny's (memory, plan), and the lookout would have taken it for Sonny's and added tools to it, an ungated goal check among them. Ownership is now a declared tool answered by Sonny's lookout, which no other client's tool carries. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Any bot could already subscribe through the agent CLI and the lookout's files, and the lookout knows no leads, but only a lead was given the tool, so a monitor needed a hand-written subscription file to hear a source. The tool now goes to every agent Sonny declares on, gated as before; each subscribes for itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
…gates A declared tool with "steps": true is never gated as a whole. The client answering its call asks the bot's gates about one step at a time, the way Codex approves each nested call of a code-mode script instead of the script. A step is an ordinary approvals row (call id CALL/STEP, step_of naming the call), announced, listed, served and answered like a gated call, and its decision is recorded in a step_decided event. The turn never waits on a step. While a step waits, its call's answer clock stops. A step lives only as long as the request waiting on it. A closed session, an answer to the call, the turn's end and a restart each drop it. Protocol 24, schema 63. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
…l_mode exec is declared with "steps": true, so the script is not gated as a whole. Each tools.mcp__S__T call is checked by its server's default_tools_approval_mode or tools.TOOL.approval_mode, under Codex's names and rule: - auto (the default) asks for a tool marked destructiveHint unless it is also marked readOnlyHint, which wins. - writes asks unless the tool is read-only. - prompt always asks. - approve never asks. Asking goes through approve_step to the agent's own gate: full runs at once, auto is judged and ask goes to the person. The script's clock stops while a call waits, as the call's clock does in the daemon. A denial rejects the call with its reason. Sonny's approval prompt marks a script's call, and step_decided refreshes it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)ℹ️ 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: 613954b794
ℹ️ 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".
…n test - A script whose call waits for the gate gives up its place among the four running scripts and takes one back once the verdict comes (Codex review). Four scripts waiting on a person would otherwise hold back every other agent's. - approve_step takes a step's tool name of up to 512 bytes. A script's identifier for a 64-byte server and tool is longer than 128. - The schema 62 test drops the new partial indexes before their columns. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce64b892d7
ℹ️ 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".
…time, refused steps for the judge A script waiting for a verdict gives up its running place but keeps its heap, so the scripts alive are bounded on their own (16, at most 4 GB at the memory cap). While a call waits, the interrupt checks measure the JavaScript still running beside it, which spends the script's time, so a spinning branch cannot outlive its timeout. A step its gates refused is recorded with its arguments and denied, and a judge of a later call sees it among the turn's refused calls unless it was then allowed as it was. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
On a busy lookout, retaking a place could spend a short script's whole time after its verdict came; now it waits the way a new script does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b4b299027
ℹ️ 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".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 4b4b299027
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
A step its gates allowed now joins the turn's calls a judge of a later call reads, as running until the client says how it ended with the new step_result request, which records step_completed. Sonny reports each allowed nested call once it has run, so a one-time effect a script already did counts as used up when it asks for another. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
… does A call that takes steps skips the gates of the call as a whole, so a sandboxed bot redeclaring an inherited tool with steps could run it ungated through a client that never asks for steps. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a74a9c3d81
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21a7b72ac6
ℹ️ 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_013jkdGDsJVnkrdmmdTXFLin
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin # Conflicts: # docs/RUST_PROTOTYPE.md
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
…-fwzozw # Conflicts: # docs/DAEMON_MEASUREMENTS.md
…-fwzozw # Conflicts: # sonny/FEATURES.md
…-fwzozw # Conflicts: # docs/RUST_PROTOTYPE.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eee140d2e7
ℹ️ 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 lookout that restarts and answers a pending exec call again started its step ids over at 1, so the agent's judge took the first gated call as one it had reviewed already and gave no verdict. Each answering now prefixes its step ids with its own id: the time, the process and a count. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
The pause's table now takes schema 64, after #393's 63. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGF2d82b9p96KboFLML
Before this PR, an
execscript was gated as a whole: one verdict covered every MCP call inside it, reads and sends alike. Codex's code mode approves each nested call instead, and decides which calls ask first from the tool's MCP annotations. This PR adopts that pattern, withautoas the default mode.There are two commits. The daemon change was discussed in the project thread first.
1. Daemon:
approve_step"steps": true, but only together withanswered_by. Such a tool is never gated as a whole. Its call starts at once, and the gates that name the tool judge its steps instead.{"op":"approve_step","bot","turn","call_id","step","name","arguments"}.CALL/STEPandstep_of. It is announced, listed, served and answered exactly like a gated call. The approver, a person, or any client holding the tag can answer it.waitdefers its reply.step_decidedevent. Denials count toward the bot's denial counts, as a gated call's do.next_lapse,lapsesandreannounceskip step rows.step_waiting.approvals.step_ofandanswers.paused_ms, each with a partial index so the query-plan audit stays scan-free. Everything is documented indocs/RUST_PROTOTYPE.md.2. Sonny: per-call approval by Codex's
approval_modeexecis declared withsteps: true. The lookout's start-up tool refresh (Open links without xdg-open, give agents Sonny's current tools and subscriptions, retry Bedrock clock-skew refusals #382) brings existing agents over to it.tools.mcp__S__Tcall is checked against its server'sdefault_tools_approval_modeortools.TOOL.approval_mode, using Codex's names and rule:auto(the default) asks for a tool markeddestructiveHint, unless it is also markedreadOnlyHint, which wins.writesasks for every call except a read-only tool's.promptalways asks.approvenever asks.approve_stepto the agent's own gate:fullmode, nothing waits.automode, the judge decides.askmode, the person decides. Sonny's prompt marks the call asa call in a running script.docs/SONNY.mdand the README.Tests
tests/test_answered.py::StepTests(7 tests):step_of, and a second ask for a waiting step is refused.approveskips asking, and that a 300 ms script survives a 600 ms wait for its verdict.cargo test --workspacepasses, andcargo clippy --workspace --all-targets -D warningsis clean.test_servedandtest_acpneeded bubblewrap installed on this machine, and three bench modules neededpsutil.