Claude Code v2.1.228: The Write Tool Can Overwrite a File Without Reading It First#
Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog
The main change in v2.1.228 is a new Write tool rule. Newer models can now overwrite a file without reading it first.
The old rule required a read. Claude had to read a file in the same session before it could overwrite that file. Without a prior read, the Write tool returned an error. The rule was a safety check. It confirmed that Claude saw a file before it replaced the content.
The new rule removes that requirement for newer models. The Write tool now matches the Edit tool. It can replace a file that Claude has not opened this session. Older models still require a read first.[1]
The effect is one fewer step. Claude does not need a read call to replace a file. This removes a tool call and shortens the edit. The gain is largest when Claude writes a new file over an old one, such as a config file or a build output.
The new rule also removes one safety guard. A read-first rule confirms that Claude saw a file before it overwrote that file. The new rule drops the confirmation for newer models. To keep the read-first behavior, use a model that still requires a read.
The rule ships inside a dated tool bundle named betaAgentToolset20260401. The bundle contains its own Bash, Read, Write, Edit, Glob, and Grep tools. Anthropic restricts the bundle to newer models. As a result, one Claude Code build applies the new rule to one model and the old rule to another.
Other Fixes in This Release#
Frozen sessions recover. In v2.1.227 a rare layout error could freeze the screen. The process kept running, but the display did not redraw. The render loop now counts each failed layout, retries from scratch, and reports the fault. The session does not go dark.[1]
Cloud logins fail fast. A missing or expired Google Cloud login retried for minutes in older builds. It now fails in seconds. The same fix applies to AWS. A session with a stale token stops instead of hanging.[1]
Cleanup deletes less. This release fixes two delete bugs. Session cleanup no longer removes a project memory folder. Plugin cleanup no longer removes a plugin that links to a live development checkout.[1]
Synced skills are restricted. Skills from claude.ai now run in a limited scope. They cannot replace local commands. Claude Code cleans and labels their descriptions. Their content does not run ! shell commands or open @ files on the local machine.[1]
New Environment Variables#
| Variable | What It Does |
|---|---|
CLAUDE_CODE_MESSAGING_TOKEN | Controls access to the local inbox for cross-session messages. A sender opens the socket named in CLAUDE_CODE_MESSAGING_SOCKET and sends this token first. If the token cannot reach peers, the inbox does not start. An inbox that no peer can reach does not run. |
NO_HEARTBEAT | Disables the keep-alive signal for a worker session, such as a self-hosted runner or a cloud host. The signal runs about every 30 seconds. A permanent signal failure stops the work. Set this variable to skip the signal. |
Both variables are new in v2.1.228 (released August 11, 2026). Neither variable was present in v2.1.227.
What This Tells Us#
Anthropic now ships tools as a dated, versioned set and enables the set per model. This method gives a newer model a different rule without a change to older models. More per-model rule splits are likely.
The rest of the release targets stalls. A failed layout pass no longer freezes the screen. A dead cloud login no longer waits for minutes. Each fix replaces a silent wait with a fast, visible result.
This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners. This content is not intended to infringe on any intellectual property rights, circumvent any protections, or encourage unauthorized access to proprietary systems.
Sources#
- Claude Code Official Changelog (v2.1.228 release notes)
Related Versions#
- Claude Code v2.1.221: Sandbox Credential Masking and a Bash Permission-Bypass Fix
- Claude Code v2.1.219: Opus 5 Becomes the Default Opus Model
- Claude Code v2.1.218: Quieter Reviews and a Guard on Team Memory
- Claude Code v2.1.217: Subagent Concurrency and Nesting Caps
- Claude Code v2.1.215: An Anthropic-Run Google Cloud Backend