Skip to content

Simplify: remove keep-warm and fork-from-turn - #780

Merged
lydakis merged 3 commits into
mainfrom
claude/project-thread-i3aye2
Nov 7, 2026
Merged

lydakis merged 3 commits into
mainfrom
claude/project-thread-i3aye2

Conversation

@lydakis

@lydakis lydakis commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

The first cuts from the simplification sweep, all three approved for 0.9.0. There is one commit for each cut.

Remove the daemon's prompt-cache keep-warm (schema 84, protocol 55)

While a tool ran or a reply streamed, the daemon resent the Anthropic call with max_tokens: 0 to keep the five-minute cache alive. Claude bots now take the one-hour cache, which needs no refresh. So this was a second request path in every turn, with its own pacing, admission, accounting and budget rules, that kept warm a cache few bots used.

  • The keep_warm setting and --keep-warm are gone. Schema 84 drops the setting from stored bots with json_remove.
  • When a five-minute cache lapses, the next call writes it again, like any other cache miss.
  • The keep_warm usage purpose and the keep_warm_failed event are gone.

Remove fork-from-turn and the per-turn task snapshots

After every completed task turn, the lookout committed the worktree's files under refs/agent/snapshots. That cost about 60 ms per turn on a 600-file repo, about 100 ms at 20k files, and about 1 s with 2k new untracked files. The only consumer was start_task with from and turn.

  • start_task loses from and turn, which also shortens the declared tool text.
  • The lookout no longer follows configured events or tracks which folders each bot may write.
  • The git helpers that tasks still use move from snapshot.rs to git.rs. That is about 1,750 lines out and about 260 in.
  • Leftovers:
    • A once migration deletes each store's STORE.snapshot-indexes, which is Sonny's own folder.
    • The upgrade step snapshot-refs asks the lead to drop refs/agent/snapshots in the person's repositories, with their OK.
  • FEATURES.md marks the row as removed.

Name no one in test fixtures and bench scripts

  • Rex, Herdr and cmux fixtures and the home_tag test use neutral names.
  • bench/role_eval.py unloaded the scheduler job by its pre-0.9.0 label. It now uses sonny.scheduler., which fixes a stale label.
  • The Harbor agent's name is now agent-runtime.
  • Old launchd label constants stay only where a migration looks for them.

Checks

Rebased on main after #771, #779, #773 and #734. The env setting from main stays in the settings list and the store contract.

  • cargo fmt --check: clean.
  • cargo clippy --workspace --tests: clean.
  • cargo test --workspace: 1827 passed, 0 failed.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T09:19:47.195513Z 4362152 New commits
🔒 Security Review ✅ Completed 2026-11-07T05:47:55.156111Z 1315ec8 PR opened
ℹ️ 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.

The daemon resent an Anthropic call with max_tokens 0 while a tool ran or
a reply streamed, to keep a five-minute cache alive. Claude bots take the
one-hour cache, which needs no refresh, so the refreshes kept warm a cache
few bots used at the cost of a second request path in every turn: pacing,
admission, accounting and budget rules of their own.

The keep_warm setting and --keep-warm go; a migration drops the setting
from stored bots. A lapsed five-minute cache is written again by the next
call, as any cache miss is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDefzB8u6kgZMqFaxB
After every completed task turn the lookout committed the worktree's
files under refs/agent/snapshots, so start_task with from and turn could
fork a task with its files as they were. Each snapshot cost about 60 ms on
a small repository and a second with a couple of thousand new files, on
every task turn, for a fork nobody used.

start_task loses from and turn; the lookout no longer follows configured
events or tracks where each bot may write. The git helpers tasks still
use move to git.rs. A migration drops each store's snapshot indexes, and
an upgrade step asks the lead to drop the refs in the person's
repositories with their OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDefzB8u6kgZMqFaxB
Fixtures use neutral names, the role eval unloads the scheduler job by
its current label (sonny.scheduler.), and the Harbor agent is called
agent-runtime. The old launchd labels stay only where a migration looks
for them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDefzB8u6kgZMqFaxB
@lydakis
lydakis force-pushed the claude/project-thread-i3aye2 branch from bb2c48f to 4362152 Compare November 7, 2026 09:18
@lydakis
lydakis merged commit 99d61f7 into main Nov 7, 2026
5 checks passed
@lydakis
lydakis deleted the claude/project-thread-i3aye2 branch November 7, 2026 09:51
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