Repository navigation
A task forks from another's turn with its files then - #380
Conversation
A history call with query may now name bot as a GLOB (* ? [...]; no name holds those): it walks each matching bot's lineage, meeting a node an earlier walk has as the rest of a shared history, so a fork's prefix is searched once under the older bot, and lists matches newest turn ID first with each one's bot and turn handle. before and next_before are turn IDs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
Collecting every matched bot's whole lineage before searching held memory that grew with the store, and a fork's own nodes past an older fork's cut were credited to the older fork, whose handle cannot read them. The walks now run as cursors merged by node ID: a shared node comes up in each walk that has it and is searched once, under the oldest such bot; a node only one walk has is that bot's. Only each walk's place and the matches are kept, the search stops at its match and byte bounds, and next_before is the node the merge stopped at. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
The lookout keeps a task's worktree as each completed turn left it: the files git does not ignore, added through an index of Sonny's own and committed on the HEAD of the time under refs/agent/snapshots/BOT_ID/TURN, naming the turn's checkpoint, and marked late when an agent was already working in that checkout again. start_task with from (and turn) makes a new worktree holding those files on a branch from that commit, forks the task's bot at the checkpoint into it, and sends the brief. remove_task drops a task's snapshots, as the lookout does for a deleted bot. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (17)
ℹ️ 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: 762337222e
ℹ️ 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: 762337222e
ℹ️ 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 deletion Bot and turn IDs are a store's own, so two daemons' tasks in one repository could overwrite, find and drop each other's snapshots: refs now sit under a hash of the store's path. The private index starts from the checkout's own each time, so a file ignored since an earlier snapshot is not carried as tracked. A deletion takes the checkout's lock, so it waits for a snapshot under way, and marks the bot gone, so none lands after; remove_task drops a task's snapshots once its worktree is gone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
A repository's hooks (reference-transaction on update-ref, post-checkout on the fork's worktree) or its fsmonitor would run in the lookout with the daemon's environment, provider keys included. Every snapshot git call now runs with hooks and fsmonitor off and without the keys a task's setup is kept from. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
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: ec3c35e5c4
ℹ️ 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.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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 pattern search found the next node by scanning every walk, and stepped a fork's shared prefix once per fork, with a statement prepared per bot up front. On a store of 800 bots and 106k nodes a search that finds nothing took 1.6 s and 35 MB. Now the walks' places sit in a heap, walks that meet go on as the oldest bot's alone, and a walk is only its node, read with one cached point lookup: 0.31 s and 10 MB, and 0.34 s on 4,000 bots and a 1 GB store, bounded by the 64 MiB read per call. Snapshots now run at most as many at once as there are CPUs, so many turns ending together do not all read their checkouts at the same time. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52e7c306c2
ℹ️ 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".
…-ys30cm # Conflicts: # sonny/src/served.rs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06bf69b709
ℹ️ 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 private index lives beside the store, made anew each time, not in the checkout's git folder, which a sandboxed task can write: a link planted at its name can no longer have the copy write outside. - Every filter the config names is turned off for snapshot git calls, so a clean, smudge or process filter's script in the worktree never runs outside the sandbox; files are kept and given back as their bytes. - Files marked assume-unchanged are cleared in the private index, so their edits are kept. - A turn's folder is the one it started in, not the bot's folder when the lookout first saw it, so a task that moved snapshots the right files. - A snapshot is late when a turn started or ended in its checkout after its turn, not only when one is still running. - A fork's brief rewrites paths from the source worktree's top to the new worktree's top, where the snapshot's files are. - The search across bots reads in one transaction, so a bot deleted meanwhile takes no node from under a walk. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
A bot deleted while the lookout was down has its snapshot refs dropped when the replay reaches its deletion; snapshots themselves are still taken only once the stream is live. A fork no longer composes a fresh task's instructions, which it threw away, so a role named only after the fork's turn no longer fails it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f504df06a
ℹ️ 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: 8f504df06a
ℹ️ 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.
Config can depend on the branch (includeIf onbranch), so the filters to turn off are listed where the checkout runs: the worktree is added with --no-checkout, and its files are written by read-tree from inside it, on its new branch, so a filter only that branch turns on is off too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
A repository a task makes inside its worktree has config the task wrote, so no list of filters to turn off can be trusted there: snapshots are now taken only of the top of one of Sonny's task worktrees, whose config and .git link the sandbox keeps read-only. The folder's own attributes, which a task writes, are read from an empty tree (GIT_ATTR_SOURCE, git 2.40 on), so they select no filter and convert no file at all. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c0fbad3c7
ℹ️ 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: 6c0fbad3c7
ℹ️ 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.
Reading attributes from an empty tree kept a task's .gitattributes from picking a filter, but an unchanged file's index entry still held its converted blob, so a CRLF file under eol=crlf came back to a fork as LF. Attributes now apply as git applies them, both ways. No filter they name can run: every driver the config holds is off, and that config is only ever a task worktree's, which no task can write. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
.agents/setup runs outside any sandbox, and a fork's files are what a sandboxed task wrote, so a task could change what setup reads and then have itself forked. A fork now skips setup; the lead is told so, and the fork can run it inside its own sandbox if the work needs it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
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: 7b252c491d
ℹ️ 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 fork is exempt from the new reason a start needs while the lead has tasks: it is a second try beside its source by its nature. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65a6290b8f
ℹ️ 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_013jkdGFna3t1d4P7QjNa2CQ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd42c98a66
ℹ️ 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".
…inks, and keep the turn's folder git wrote new objects straight into the repository's object folders, which a task can make links out of its sandbox. Its objects now go to the sealed git folder's own, with the repository's as an alternate, and are moved in through each folder opened with O_NOFOLLOW; one that is a link stops the snapshot. A fork started where its source works now, not where the turn it forks worked. The snapshot now names that folder, and a fork starts there. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1eb7c389e0
ℹ️ 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: 1eb7c389e0
ℹ️ 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.
… snapshots a bot could reach - Snapshot refs are written as loose refs through folders opened without following a link, and dropped the same way; git only drops ones it packed. - A task's folder in its worktree is opened part by part without following a link, and made when its commit has none, as after its last file went. - No snapshot is taken while a bot's folder holds the sealed git folder. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
…e to the checkout Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
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: 29d2b08c4d
ℹ️ 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 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
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
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: 84fd5fbc4c
ℹ️ 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.
…shots and forks No snapshot is taken, and no fork restored, through a sealed folder in $TMPDIR or /tmp, which every sandbox lets its bot write. The task tests' lab moves to the build's temporary folder, out of them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1aa17c85e
ℹ️ 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: f1aa17c85e
ℹ️ 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.
The folders its settings add, such as its repository's git folder, hold no sealed folder either, for snapshots and fork restores alike. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
…-ys30cm # Conflicts: # sonny/FEATURES.md
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: ef125c75ae
ℹ️ 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 partial clone's promisor remote could name a program (ext::), which resolving HEAD at an absent commit would run before the folder is sealed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
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: 3553647904
ℹ️ 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 added to what a bot may write after it was made was unknown to the housing check until the lookout restarted; one that cannot be read is taken to write anything. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
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: 302e4a7395
ℹ️ 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 task's undo removed the worktree and branch through plain git, whose hooks a task-writable hooksPath can name; it now goes through the same run as a snapshot's git. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGFna3t1d4P7QjNa2CQ
|
The Generated by Claude Code |
|
I took over the blocked macOS rerun: run 41017140263 is now attempt 2 and the macos job is running. The same |
a_fire_ends_only_the_trigger_it_ran_for failed once on macOS (#380's run): forget_done returned 0 right after the test dropped the lock it held. flock belongs to the open file, and a process another test forks shares it until it execs, so the lock can stay taken a moment after the drop. forget_done is built for that (Sonny's window tries again on its next refresh), so the test now tries again for up to five seconds, as the window would. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6
…454) * Sonny triggers: a sent one-shot keeps its row until its turn ends well A one-off, or a `--runs` trigger's last run, deleted its state row as soon as its message went out, so a turn that failed afterwards (offline, a login expired) left nothing for /background, the footer's count or the triggers tool to show. Its row now stays, and whoever asks the daemon how its turn ended removes it once that turn completed with any answer passed on; a failed one stays until removed, as systemd keeps a failed unit until reset-failed. Fixes #422. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers: forget a done one-shot also once it ends after its turn Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Runtime tests: a sent one-shot keeps its row until its turn ends well Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers: forgetting a done one-shot never waits for the lock Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny: the lead's next look repeats, with a ready check and a name example The eval of #433 showed leads setting the look as a one-off `at` (3 of 4), with no if command (4 of 4), and one under the wrong name. A one-off whose if command says no ends, so a skipped look was gone. lead.md now says the look repeats (every, or cron for a set hour), never at or in, gives the skip-while-writing check as a command, names it by example (web.lead.next for web.lead), and says the next setting uses replace. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 * Sonny triggers test: a lock just dropped may still be held a moment a_fire_ends_only_the_trigger_it_ran_for failed once on macOS (#380's run): forget_done returned 0 right after the test dropped the lock it held. flock belongs to the open file, and a process another test forks shares it until it execs, so the lock can stay taken a moment after the drop. forget_done is built for that (Sonny's window tries again on its next refresh), so the test now tries again for up to five seconds, as the window would. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGEbQZnXUy1kATtYcQ6 --------- Co-authored-by: Claude <[email protected]>
What
This is the second Delta-inspired piece, after #373. A lead can fork a task at a turn it completed. The fork gets that conversation and also the task's files as they were then, in a worktree of its own. Today a fork shares its source's folder, so two attempts at the same work end up editing the same files.
Snapshots (
sonny/src/snapshot.rs, taken by the lookout)completedin a task worktree that Sonny made (~/.agent/worktrees/), the lookout records the worktree's files as a commit underrefs/agent/snapshots/STORE/BOT_ID/TURN.GIT_INDEX_FILE, started from a copy of the worktree's own index, so only changed files are re-read). The person's staging is never touched.commit-treeon the HEAD of the time, so no hooks run, and it names the turn's checkpoint in anAgent-Checkpoint:trailer.Agent-Snapshot: late, and a fork from it says so.remove_taskdrops them too. Git's own gc then frees whatever nothing else holds.Forking (
start_tasktakesfromand optionallyturn; no new tool)turnis the number in a turn handle. Without it, the fork uses the newest turn that has a snapshot.agent/NAME, branched from the commit the source was on. It gets the snapshot's files throughread-tree -u --resetand thenreset, so changes since that commit are uncommitted, as they were in the source..agents/setuprun the same as for a new task. Thenagent fork --source --checkpoint --workspaceandagent runsend the brief.profile,modelandeffortare refused whenfromis set. A turn without a snapshot is refused too, and leaves nothing behind.Faster search across bots (
history_search_bots, from #373)Deliberately left out to avoid bloat (agreed in the thread): an edited-file index, a
/forkcommand, rewinding in place, and a turn-end hook in the daemon. The daemon's protocol doesn't change.Cost
Snapshots run in the lookout, off the daemon. In a 100,000-file repository, a completed task turn costs about 0.2 s (
git add -Aagainst a private index,write-tree,commit-tree,update-ref), the same asgit statusthere, plus onebots --activerequest. Unchanged files are stored once, because git shares blobs. A worktree holding 20,000 new files that are not ignored costs about 0.7 s a snapshot.Tests
snapshot::tests::a_fork_gets_the_files_of_the_turn_and_none_of_the_persons_stagingchecks that the person's staging survives, that ignored files are left out, that later work is not in the turn's files, and coversfindby turn and newest,late,restore(with a deleted file, an untracked file and an empty index) andforget.sonny/tests/task.rs::a_task_forked_from_another_s_turn_gets_its_files_then_in_a_worktree_of_its_ownrunsstart_taskend to end with a stand-inagent. It checks the refusals, the exactforkandrunarguments, the files and branch, and thatremove_taskdrops the source's snapshots.tests/store_contract.rspass unchanged with the new merge.cargo test --workspacepasses locally, and clippy and fmt are clean.🤖 Generated with Claude Code