Repository navigation
Sonny: the lead picks a task's folder: shared, a repository's worktree, or its own - #409
Conversation
A lead whose folder is not a git repository, such as a workspace holding several repositories, started every task in its real folder: no worktree, no branch, and the lead was told each task had a worktree. Now such a task gets an empty folder of its own beside the worktrees, makes there what it works in (a workspace made with the folder's tooling, as its brief says), and reads the lead's folder where it is. It is told the lead's folder's rules and memory, and its memory tool saves to the lead's project. remove_task deletes that folder once every repository in it has nothing uncommitted or unpushed. lead.md, task.md, the project rule and the tool descriptions say where a task works, and every start says so in its result. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (6)
ℹ️ 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: d296882d47
ℹ️ 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: d296882d47
ℹ️ 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.
…e or its own Outside git a task now shares the lead's folder by default, as before but said so, since work there is often on the files there. start_task's `folder` names a folder inside the lead's, such as a repository it holds, whose worktree the task gets, told the rules of the folders above it too; `own_folder` gives the empty folder. lead.md leans to a worktree for a task that changes a repository, so tasks can try things in parallel. Codex review: commits on a detached HEAD count as unpushed when removing a task's own folder, and the person's words in such a task are attributed to the lead's project for memory cleanup. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
Codex security review: a task can write the settings of a repository it made in its own folder, such as core.fsmonitor, which git runs as the person, outside the task's sandbox, when remove_task checked it with git status. Sonny now runs nothing there: a task's own folder is removed only with discard, once the task says its work is pushed, as lead.md and the tool say. The fsmonitor test checks that nothing runs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e51391e2e6
ℹ️ 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 review: - A task given a repository inside the lead's folder is told the lead's project memory, and is recorded like an own folder, so its memory tool and the cleanup's `said` save to the lead's project, even when the repository's folder is in no project. - remove_task finds a worktree's repository by the git folder it shares with the lead's, as a submodule's is, or by the main checkout git lists for it inside the lead's folder, rather than a git folder named .git. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e37f1bfc9
ℹ️ 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: 0e37f1bfc9
ℹ️ 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.
…s top Sonny records that it gave the task an empty folder of its own, so a repository the task makes there is never taken for a worktree: remove_task still removes it with discard, runs no git in it, and a task of the same name started elsewhere is not given it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b12617ba33
ℹ️ 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: b12617ba33
ℹ️ 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.
…nny recorded The record of a task given a folder now holds the checkout its worktree was made from, so remove_task uses it rather than requiring the repository's main checkout to be inside the lead's folder. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
…the repository's A repository inside the lead's folder has its .agents no more kept from the lead's sandbox than the rest of it, and setup runs outside any: so the script is always the lead's folder's own, which the sandbox keeps, with AGENT_SOURCE naming the repository's checkout. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
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: 3068abe609
ℹ️ 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 folder in no repository fell back to the task working in it in place, so a folder git keeps, such as .git/hooks, could become a task's writable folder, deeper than what keeps it read-only. A task given a folder only ever gets a worktree of the repository there. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
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: c845ed51b5
ℹ️ 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.
Whatever a folder named when it was checked, the worktree made from it must be of a repository whose git folder is inside the lead's folder, which the task is then given to write: a link swapped in since, or a .git file naming a repository elsewhere, is refused and its worktree undone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
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: 3e027143ed
ℹ️ 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 folder the last commit has as a link out of the repository, whatever the lead's checkout has there now, would make the task's folder wherever the link leads; the start is refused and the worktree undone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
…-5nccau # Conflicts: # sonny/src/served.rs
…-5nccau # Conflicts: # sonny/agents/task.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 283290ee9c
ℹ️ 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_013jkdGCrDV3wjc6rUfmxAoc
…-5nccau # Conflicts: # sonny/FEATURES.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf128b4220
ℹ️ 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".
…'s roles Codex review: a task given folder was told the rules of the repository's folder, and its roles were looked for there too, so a profile the lead's project defines, its task profile included, was not found and the start failed. Roles now come from the lead's folder, as the project info that names them does; the rules still come from where the task works. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGCrDV3wjc6rUfmxAoc
A fork of a task Sonny recorded, made in the same repository, is recorded as it is, so the lead that started it removes it there; a fork takes neither folder nor own_folder; snapshots are dropped in the task's own repository. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
Why
A lead whose folder is not a git repository, such as a workspace folder holding several repositories, started every task in its real folder, with no say in it.
task::worktreeonly checked the lead's own folder, andlead.mdtold the lead each task gets a worktree.Per-repo worktrees, a copy-on-write clone of the workspace, and create/remove hooks were all considered and rejected. The lead knows the work and the person's tooling (often from memory), so it chooses each task's folder.
What
start_taskgives the lead three choices, and every start result says which one the task got:folder: a folder inside the lead's, in a git repository it holds. The task gets a worktree of that repository and works at that folder in it. It is told the rules of the folders above it too, and takes its roles from the lead's folder.lead.mdleans toward this for any task that changes a repository, so tasks can try things in parallel. Refused when:own_folder: an empty folder of the task's own at~/.agent/worktrees/NAME, recorded asownin~/.agent/worktrees/.folders/NAME. The task makes there what it works in, such as a workspace on another branch made with the folder's tooling, and reads the lead's folder where it is. It is told the lead folder's rules and memory. Itsmemorytool and the nightly cleanup'ssaidattribute it to the lead's project.Setup is always the lead folder's own
.agents/setup, never a script inside a nested repository.remove_task:discard, after the lead asks the task whether its work is pushed. Sonny never runs git in repositories a task made (Codex security review: their config, such ascore.fsmonitor, would run as the person outside the sandbox).Text updated:
lead.md,task.md, the project's task rule, the tool descriptions, and the Tasks row insonny/FEATURES.md.Not in this PR
Tests
End-to-end tests in
sonny/tests/task.rs:discard. A task-made repo withcore.fsmonitor, at the folder's top, checks that nothing runs, and removal from another folder is refused.folder:../, a plain folder,.git/hooks, a committed link out;Locally,
cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandcargo test --workspacepass.🤖 Generated with Claude Code