Repository navigation
Let an agent look at its own automations unjudged; gate what acts (H13) - #734
Conversation
Codex Review Summary: ✅ CompletedThis 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: 47d7c4b9d0
ℹ️ 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".
47d7c4b to
bfa1070
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e274d4b411
ℹ️ 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".
The automations tool's list and show run as reads do, also for an agent no one reviews, and hold only the asking agent's own, told by its id in its store: those that wake it (a run's agent too), answer to it, or start an agent it added. An add, removal or run is a step its gate judges, as a script's calls are, and keeps the time the gate took. The tool's description is trimmed so a lead's tools keep within their share. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE9yc1n2RvseSR8ahH
f77435c to
973ad01
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 973ad01811
ℹ️ 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".
The row comes from the definition and state the ownership check read, not from the files read again, which a replacement in between could have made another agent's. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE9yc1n2RvseSR8ahH
Picks now read as asks::picks (an option's number), since #776 lets words in focus answer too: words end quiet, a pick does not. Also passes trigger::tool its Caller where #776 removes a question's deadline, which main needs since #734. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEcHQ2BxUW7eMzTs6K
#776 called trigger::tool with one argument, but #734 had already given it a second (&Caller). Each PR was green on its own; together main does not compile. Pass Caller::default(), as the deadline add in the same file does. Claude-Session: https://claude.ai/code/session_013jkdGFG8yDNENZhjTzfLnt Co-authored-by: Claude <[email protected]>
What changes
Until now, the gate judged every
automationscall as a whole. A list orshowwent to the agent's gate the same way anadddid. A sandboxed agent with no reviewer had its lists refused outright. And a list showed every automation in the HOME, whichever agent it woke.What the gate judges: the tool is now declared with
steps: true. The tool host answers a look (a call with noadd,removeorrun) right away. An add, removal or run goes to the agent's gate as oneapprove_step, the same way a script's calls are judged, and its outcome is reported withstep_result. A confined agent with no gate is still refused those calls, as before. The time the gate takes to decide doesn't count against the call's deadline.Scope: an agent's list and
showhold only the automations it has a part in. The automation is matched by the agent's id in its store, not by its name:Rows now carry
byandreply_to_idfor this. The person'ssonny automation liststill lists every automation.What holds afterwards: nothing an agent does through this tool acts outside its sandbox unless its gate judged that specific action first. A look reads only the agent's own rows.
Across restart and replay: no new state is stored. The step uses the existing
approve_steppath, and the rows are read from the trigger files on each call.remove,runandaddare not limited to the caller's own automations. Each is gated as a step that acts, and since the list is limited, an agent no longer learns other agents' automation names from it.Tool budget
A lead's declared tools must fit within half of
DECLARED_BYTES, and main was already 10 bytes under that limit. The new scope wording would have put it 82 bytes over. To make room, the description is trimmed to the same meaning in fewer words. It also drops "(a Mac keeps watch)", since Linux keeps watch through systemd too. The lead's tools are now 7 bytes under the limit.Tests
test_served.py::test_a_sandboxed_agent_no_one_reviews_sees_its_automations_and_adds_none: fails on main, where the list is refused withescalation_refused, and passes with this change.test_served.py::test_an_agent_s_automation_waits_for_its_gate: fails on main, where arunasks no step, and passes with this change. It checks that a look asks nothing and that a run is asked and then denied.trigger::tests::an_agent_s_list_holds_only_the_automations_it_has_a_part_inchecks three things:steps, the same way Sonny does.tests.test_servedpasses.Cost
inspectround trip, since there is no review check.approve_steprequest and onestep_resultrequest.Docs
The tool description and docs/SONNY.md are updated. The FEATURES Automations row (H13) goes in through the release PR's row file.
Upgrade notes
None. Running agents get the new declaration the next time Sonny declares its tools again.
🤖 Generated with Claude Code