Skip to content

feat(nano): staleness-gate soft refresh (PR 12) - #891

Merged
agentforce314 merged 1 commit into
mainfrom
feat/nano-staleness-refresh
Aug 16, 2026
Merged

feat(nano): staleness-gate soft refresh (PR 12)#891
agentforce314 merged 1 commit into
mainfrom
feat/nano-staleness-refresh

Conversation

@agentforce314

Copy link
Copy Markdown
Owner

7 staleness blocks in the TB run were all the same shape: the agent's own script touched a file after Read, then Edit demanded a ceremonial re-Read round-trip. Nano now soft-refreshes on read-then-modified files — proceeds against current bytes, ladder arbitrates (changed target region still errors actionably); never-read keeps the hard block. Stock Edit untouched. 63 tests pass.

🤖 Generated with Claude Code

The first TB 2.1 nano run hit 'file must be read first and be unchanged'
7 times (tune-mjcf 2x, build-cython-ext 3x, ...), each a full model
round-trip on a wall-clocked task, always in the same shape: the agent's
own script or build touched the file after the last Read.

Nano's Edit now discriminates via file_read_status(): never-read keeps
the hard error (blind-edit protection intact), but read-then-modified
proceeds against the CURRENT bytes and lets the ladder arbitrate — every
old_string must still match uniquely in the current content, so an
external change that touched the target region still fails with the
actionable not-found error, while changes elsewhere no longer cost a
ceremonial re-Read. Fingerprint refreshes on success. Stock Edit
unchanged; pi has no gate at all.

Tests: changed-elsewhere proceeds + follow-up edit passes the refreshed
gate; changed-target still blocked; never-read still blocked. 63 pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@agentforce314
agentforce314 merged commit e36fb9a into main Aug 16, 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.

1 participant