Skip to content

A task forks from another's turn with its files then - #380

Merged
lydakis merged 40 commits into
mainfrom
claude/project-thread-ys30cm
Oct 30, 2026
Merged

lydakis merged 40 commits into
mainfrom
claude/project-thread-ys30cm

Conversation

@lydakis

@lydakis lydakis commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

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)

  • When a turn ends completed in a task worktree that Sonny made (~/.agent/worktrees/), the lookout records the worktree's files as a commit under refs/agent/snapshots/STORE/BOT_ID/TURN.
  • The files are added through a private index (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.
  • Files git ignores are left out. The commit is made with commit-tree on the HEAD of the time, so no hooks run, and it names the turn's checkpoint in an Agent-Checkpoint: trailer.
  • If any bot is running in that checkout by the time the tree is written, the commit is marked Agent-Snapshot: late, and a fork from it says so.
  • Snapshots run beside the stream, one at a time per checkout and at most as many at once as there are CPUs. They start only once the stream is live, so a replay never snapshots files that have changed since.
  • A deleted bot's refs are dropped, and remove_task drops them too. Git's own gc then frees whatever nothing else holds.

Forking (start_task takes from and optionally turn; no new tool)

  • turn is the number in a turn handle. Without it, the fork uses the newest turn that has a snapshot.
  • The fork's worktree is on agent/NAME, branched from the commit the source was on. It gets the snapshot's files through read-tree -u --reset and then reset, so changes since that commit are uncommitted, as they were in the source.
  • Seeding and .agents/setup run the same as for a new task. Then agent fork --source --checkpoint --workspace and agent run send the brief.
  • The brief gets one line telling the copy which folder it is in now, and paths into the source's worktree are rewritten to the new one.
  • The fork keeps its source's instructions, role, model and sandbox, so profile, model and effort are refused when from is set. A turn without a snapshot is refused too, and leaves nothing behind.

Faster search across bots (history_search_bots, from #373)

  • The search for a pattern found the next node by scanning every bot's walk, read a fork's shared history once per fork, and prepared one statement per bot. Now the walks' places sit in a heap (O(log k) a step), walks that meet go on as the oldest bot's alone, so each node is read once, and a walk is just its node, read with one cached primary-key lookup.
  • On 800 bots and 106k nodes, a search that finds nothing went from 1.6 s to 313 ms and its added memory from 24 MB to 1.5 MB. A common word went from 37 ms to 0.7 ms. On 4,000 bots and a 1 GB store the same search takes 338 ms, still bounded by the 64 MiB a page reads. Results are unchanged.

Deliberately left out to avoid bloat (agreed in the thread): an edited-file index, a /fork command, 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 -A against a private index, write-tree, commit-tree, update-ref), the same as git status there, plus one bots --active request. 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_staging checks that the person's staging survives, that ignored files are left out, that later work is not in the turn's files, and covers find by turn and newest, late, restore (with a deleted file, an untracked file and an empty index) and forget.
  • sonny/tests/task.rs::a_task_forked_from_another_s_turn_gets_its_files_then_in_a_worktree_of_its_own runs start_task end to end with a stand-in agent. It checks the refusals, the exact fork and run arguments, the files and branch, and that remove_task drops the source's snapshots.
  • The three pattern-search tests in tests/store_contract.rs pass unchanged with the new merge.
  • cargo test --workspace passes locally, and clippy and fmt are clean.

🤖 Generated with Claude Code

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
@lydakis lydakis self-assigned this Oct 29, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T07:01:24.533188Z c3ade60 New commits
🔒 Security Review ✅ Completed 2026-10-30T07:07:15.967480Z c3ade60 New commits

Security findings

Advisory findings (17)

ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved
Comment thread sonny/src/snapshot.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved
… 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved
Comment thread sonny/src/snapshot.rs Resolved
Comment thread sonny/src/task.rs Resolved
Comment thread src/store/db.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved
Comment thread sonny/src/lookout/mod.rs Resolved
Comment thread sonny/src/task.rs Resolved
- 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/task.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/task.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/task.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/task.rs Resolved
Comment thread sonny/src/snapshot.rs Resolved
…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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved
Comment thread sonny/src/task.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved
… 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved
…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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread sonny/src/snapshot.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/snapshot.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/lookout/mod.rs Resolved
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ 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.

Comment thread sonny/src/task.rs Resolved
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

lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

The macos job on c3ade60 failed in trigger::tests::a_fire_ends_only_the_trigger_it_ran_for (trigger.rs:4848, left 0, right 1). This PR doesn't touch trigger.rs. The same test passed on macOS at 302e4a7, whose only differences from c3ade60 are in task.rs, snapshot.rs and tests/task.rs. It also passes 15 of 15 runs locally, so this is a flake. I can't re-run the job from here (the API returns 403), so a re-run of the failed job is needed from the Actions tab.


Generated by Claude Code

@lydakis
lydakis merged commit 2b41b9e into main Oct 30, 2026
6 of 7 checks passed
@lydakis

lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

I took over the blocked macOS rerun: run 41017140263 is now attempt 2 and the macos job is running. The same trigger::tests::a_fire_ends_only_the_trigger_it_ran_for assertion also failed on main 2cf0ebd in run 41016873544 (Linux Rust tests, line 4848, left 0 / right 1). That recurrence remains recorded as unresolved pending validation or a diagnosed fix; it is not waived for release. No source changes from this takeover.

lydakis pushed a commit that referenced this pull request Oct 30, 2026
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
lydakis added a commit that referenced this pull request Oct 30, 2026
…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]>
@lydakis lydakis mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants