Repository navigation
Declared tools pass down a count of generations; Sonny's start goes as deep as task_depth - #504
Merged
Merged
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. |
lydakis
force-pushed
the
claude/project-thread-0ttt4p
branch
from
October 31, 2026 06:42
a5fe1ec to
b8d0e1b
Compare
…s deep as task_depth A declared tool's inherit may be a count as well as true or false: each bot created takes the tool one generation fewer, false the last, as a packet's hop count runs down. A fork is a copy and keeps its source's count. Protocol 28. Sonny declares start_task and remove_task with the generations task_depth leaves below each agent, so a task's helpers have the right tools from their first turn instead of until Sonny next declares them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE8xLJp2WvDkgJJ9p7
On a sandboxed bot's own socket, a declared tool a client answers now also needs its inherit within the caller's remaining allowance: a bot holding `run` for one more generation can't hand its child `run` for two, or for good. The tools a bot takes from its creator are counted a generation down before that check, so a bot's own tool isn't measured against itself. The task prompt calls LEAD the agent that started you, which is a lead of the folder or a task that has a lead of its own. Protocol moves to 29, since 28 goes to the PR merging first. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE8xLJp2WvDkgJJ9p7
lydakis
force-pushed
the
claude/project-thread-0ttt4p
branch
from
October 31, 2026 07:00
b8d0e1b to
d206571
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d206571ff6
ℹ️ 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".
…placed Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGE8xLJp2WvDkgJJ9p7
lydakis
pushed a commit
that referenced
this pull request
Oct 31, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDM2LnoDcXYpJdFY7Y
lydakis
added a commit
that referenced
this pull request
Oct 31, 2026
* Sandbox: Unix sockets reached only in the bot's folders and those named A program listening on a Unix socket runs what it is asked outside the sandbox, as a browser's daemon launches a browser or Docker runs a container. As Claude Code's sandbox blocks them by default, Seatbelt now lets a workspace-write bot's commands reach only the sockets in its own and writable folders, and those its new unix_sockets setting names; a read-only bot's only those named. Sonny's permission rows take unix_sockets too. Linux still reaches every socket it can see; that follows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDM2LnoDcXYpJdFY7Y * Sandbox: a bot's sockets bounded in its create reply and resolved where they exist A create reply's bound now covers its unix_sockets, which take at most 32 KiB as JSON as writable folders do. A socket not made yet is stored with what of its path exists resolved, so a link above it, as macOS's /tmp is, still matches Seatbelt's real path; Sonny's rows resolve them the same way. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDM2LnoDcXYpJdFY7Y * Protocol 30: #504 took 29 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDM2LnoDcXYpJdFY7Y * One resolver for a sandbox's paths, shared by the daemon and its clients The daemon's real-path resolver, which follows a dangling link to its target, moves to agent-client, so Sonny reads a row's sockets back exactly as the daemon stored them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDM2LnoDcXYpJdFY7Y * Sandbox: only the sockets a bot names, not those in its own folders A hard link in a bot's folder to any socket, the daemon's among them, needs no right to the socket and would reach it by a name there. So, as Claude Code's sandbox and Codex's managed network do, a sandboxed bot's commands reach only the Unix sockets its unix_sockets names. A macOS test connects from inside Seatbelt to the daemon's socket in the workspace, another there, one outside, one named and one in a named folder. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDM2LnoDcXYpJdFY7Y * Tests: the sandbox helpers build on macOS too Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGDM2LnoDcXYpJdFY7Y --------- Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#490 left a known gap. A declared tool's
inheritcould only be yes or no, so Sonny could say "passstart_taskon" or "don't", and nothing in between. A task's tools were only corrected when its window opened or the tool host refreshed it. That meant a helper started in the task's very first turn could inherit astart_taskthat then refused at call time. George agreed to the daemon fix on 10-31 at 05:56Z: letinheritcount generations.What
Daemon (protocol 29, no schema change):
inheriton a declared tool istrue(the default, still left out on the wire),false, or a whole number of generations.2reaches its children as1, their children asfalse, and stops there. It works like a packet's TTL hop count, and the daemon still knows nothing about leads or depth.creator_declared, and the sandboxed-creator path incapped.runwith one generation left can't give its childrunfor two generations, or for good.tools::Inherit { All, Generations(u32) }, withwithin(bound)for the check above. Its serde form is a bool or a count, and anything else is refused.docs/RUST_PROTOTYPE.md.Sonny:
Role.passesis now the number of generations below an agent that can start tasks, orNonefor no end.start_taskandremove_taskare declared with that count. Withtask_depth = 2, a lead declaresinherit: 1, its tasks getfalse, and their helpers get nothing, from the first turn on. Withtask_depth = 3, the lead declares2. Withtask_depth = 0,inheritis left out.Protocol number
This takes protocol 29, because #498 takes 28 and merges first.
Tests
a_tool_declared_for_some_generations_goes_that_far_down_and_no_further, covers three things:false(on the wire too), then nothing;true,false,0and3parse, while-1and"all"are refused.test_a_sandboxed_bot_uses_the_daemon_as_itself_and_no_further) now gives Bobrunfor 2 generations. A child that declaresrunfor 1 is created. Children that declare it for 2, or with no end, are refused withnot_permitted. I checked that this test fails without thecappedchange.cargo test --workspacepasses,tests/test_approvals.pypasses with bubblewrap, and clippy (-D warnings) and fmt are clean.🤖 Generated with Claude Code