Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.265 ·

Code blocks can now render as unified diffs

A new diff format for code blocks parses and validates unified-diff/patch text before displaying it

TierUse it nowhow much it should matter to you
Useful3my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaUI Componentswhat it touches
KindNew Featuresin v2.1.265,
Group of 2 Use it now

A new diff format for code blocks parses and validates unified-diff/patch text before displaying it

What

A new self-contained unified-diff parser reads Index:/diff/---/+++/@@ headers and hunks into structured objects, validating that the added/removed line counts match what the hunk header claims.

The Code component gained a new format value, "diff", alongside the existing "source" format. When set, the text is validated and parsed through this new parser, and anything with a malformed @@ -a,b +c,d @@ header (missing, non-numeric, or out-of-bound numbers) is rejected with a specific error such as "no @@ hunk header found" or "header is not @@ -a,b +c,d @@ within N lines". A companion wrap prop accepts "wrap" or "truncate-end" to control how long diff lines are displayed.

Why

This lets diff/patch text be rendered as a properly parsed, validated diff view instead of plain text, catching malformed diffs before they're displayed.

Read from
Names in the bundlediff
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Added since A small documentation edit on Manage costs effectively touched a line naming diff after this was published. Developers usually bring limit questions to their admin, so it helps to know which ceiling they hit. These situations mean different things: costs see the edit
Added since A small documentation edit on How agent identity works touched a line naming format after this was published. <img className="block dark:hidden" src="https://mintcdn.com/claude-ai/oY6LusJt4c576Dc3/images/claude-tag/diagrams/request-path.svg?fit=max&auto=format&n=oY6LusJt4c576Dc3&q=85&s=a7f2e0f4303072b4c8e4f3197bf0cb12" alt="Diagram showing the req… claude-tag/concepts/agent-identity see the edit
Confirmed since Anthropic's documentation has since written up diff, on Configuration file reference. Claude Science reads optional settings from a TOML file named `config.toml` in its default data folder, which is `~/.claude-science/config.toml` on macOS and Linux and `%USERPROFILE%\.claude-science\config.toml` on Windows. Every key has a… claude-science/configuration-file-reference see the edit
Confirmed since Anthropic's documentation has since written up format, on Error reference. * If the message asks you to convert the image, convert it to PNG, JPEG, GIF, or WebP and attach it again. Claude Code can verify dimensions for these formats from the file header, without decoding the image. errors see the edit
Confirmed since Anthropic's documentation has since written up wrap, on Triage requests. ```text wrap theme={null} claude-tag/users/use-cases/triage-requests see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up wrap, on Triage requests.

See this entry in the whole of v2.1.265 →

Feedback