Repository navigation
v0.8.0
anchor 0.8.0 is about editing files safely: your own edits are never overwritten, each model edits in the format it was trained on, and a bug leaves a report you can send instead of a stack trace on your screen.
New
Your edits are never overwritten. If you change a file while anchor's diff is waiting for your answer, anchor no longer writes over your change. An edit_file replacement is made in your version of the file, as long as the text it replaces is still there exactly once. Any other change isn't written, and the model is told to read the file again.
apply_patch for OpenAI's models. GPT, Codex, the o-series and gpt-oss models now edit files with apply_patch, the format they're trained on. One patch can add, update, delete and move several files, and you see one diff and answer once. Every other model keeps write_file and edit_file. anchor picks the format from the model on every request, so /model and sub-agents with their own model follow it.
Several changes in one edit_file call. edit_file takes edits, a list of replacements made in order. You see one diff and answer once, and either every replacement is made or none is.
Crash logs. When anchor hits a bug, it says so in one line and writes the details to ~/.anchor/logs/crash-*.log. Only you can read the file, and the newest 10 are kept. Please attach it if you report the problem. Set ANCHOR_DEBUG=1 to see the stack trace on the terminal too. A rejected key, a rate limit or a provider that's down is reported as before, not recorded.
Changed
- Replacing a whole file needs a read first.
write_fileon an existing file now asks the model to read it first, or to read it again if it changed since. The model can't drop lines it never saw./clearand--resumestart with nothing read. - Writes are atomic. Each file is written to a temporary file and renamed over the original, so a failed write never leaves half a file. Files keep their encoding, byte-order mark and permissions. New files are UTF-8 without a byte-order mark.
/undorestores deleted and moved files, and puts back each file's original encoding.- Long command output is capped as it arrives. A command that prints without end keeps its first and last lines and says how much it left out, instead of filling memory until it times out.
--json: a turn that fails sends anerrorevent and thenready, so a client is never left waiting. The event carries a one-line message rather than a stack trace.
Fixed
git ls-filescould hang anchor when git printed a lot of warnings.- Looking up a saved API key blocked other sub-agents while the keychain answered.
- Each model client opened its own connection pool. They now share one.
- On a plain terminal, an approval prompt could be split by a sub-agent's output.
- Secret masking re-read every secret file for each tool result. It now re-reads a file only when it changes, so an edited
.envvalue is still masked straight away.
Upgrade
brew upgrade anchor # Homebrew
scoop update anchor # Scoop
curl -fsSL https://raw.githubusercontent.com/fuseraft/anchor/main/install.sh | bash # install scriptDocs: Tools · Safety and approvals
Full Changelog: v0.7.0...v0.8.0