Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.275 ·

Atomic file writes support a 'beforePublish' refusal hook

Atomic file writes can now be aborted mid-write by a new beforePublish check that throws PublishRefusedError

TierUnder the hoodhow much it should matter to you
Useful3my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaFile Writeswhat it touches
KindInternal Changesin v2.1.275,
Under the hood

Atomic file writes can now be aborted mid-write by a new beforePublish check that throws PublishRefusedError

What

The internal helper Claude Code uses to write files and other artifacts safely (writing to a temporary location and then swapping it in, so a crash never leaves a half-written file) now supports a beforePublish check that runs just before the write completes. If that check returns false, the write is aborted, a new PublishRefusedError is thrown, and nothing is published, including cleaning up any empty placeholder file that may have been created along the way.

Why

This gives internal callers a way to cancel a write at the last moment based on some condition, without risking a partially-written or stray file being left behind.

See this entry in the whole of v2.1.275 →