NewAnthropic is watermarking Claude’s text output from 2 August 2026.See which models carry it →

Is Claude-generated code watermarked?

By Claude Watermark Research · Updated

Anthropic's marking applies to text output from qualifying models, and code is text — so in principle it is in scope. In practice a distributional watermark needs entropy, meaning genuine freedom to pick between near-equivalent tokens, and code has far less of it than prose. Syntax is fixed, identifiers are constrained by the surrounding codebase, and formatters normalise whatever is left. The less choice the sampler has, the weaker the signal.

Check and remove AI traces from my text. Checking runs in your browser, no account, nothing uploaded.

Anthropic says this itself

This is not our inference. From Anthropic's own announcement: “code—which in very many cases has to be exact—has generally less watermarking than some other forms of text.”

And on the mechanism behind that: “Where an *exact* output is required—where there isn't a choice, and something would be factually wrong or a piece of code would break if a different term was chosen—the watermark isn't applied.”

The same page gives the prose version of the rule with an example: “Watermarking is sparser on factual passages where there are fewer choices that can be made without decreasing the accuracy of the text.” Their illustration is that after “Isaac Newton's most famous work was called *Principia*…” the next word can only be *Mathematica*, so there is nothing for the mark to act on.

Which settles the question people actually ask about Claude Code. Not “is code exempt” — it is in scope — but “does it carry a usable signal”, and the answer from the company doing the marking is that it carries less than prose does.

Why entropy is the whole story

A distributional watermark works by biasing the choice among candidate next tokens that are roughly equally good. Each such choice carries a fraction of a bit of signal, and detection needs many of them to accumulate into something statistically distinguishable from chance.

Prose offers that constantly — a dozen ways to open a sentence, near-synonyms everywhere. Code does not. After `for (let i = 0; i` there is essentially one continuation. Variable names are dictated by what already exists in the file. Import order is conventional. The sampler is frequently near-deterministic, and a near-deterministic choice carries no signal to bias.

What happens to code after it is generated

Even where a signal exists, normal engineering practice destroys it. Prettier, Black, gofmt and rustfmt rewrite whitespace and line breaks. Linters rename things. Code review edits it. A merge interleaves it with other people's work.

This is the same mechanism Anthropic acknowledges for prose — marks may not survive heavy editing — except that in code the editing is automated and happens on every save.

What this means at work

There is no public detector. Anthropic offers detection in private preview to eligible organisations, but ordinary enterprise scanners, linters and CI products cannot test for the watermark without that restricted access.

So a strict no-AI policy is still enforced the way it always was: by policy, by review, and by the ordinary tells a human notices — a commit that is too large and too uniform, comment style that does not match the rest of the file, an unfamiliar idiom.

Which models are in scope

Marking applies to Claude models launched on or after 2 August 2026. Opus 5, Sonnet 5, Fable 5, Mythos 5, Opus 4.8 and Haiku 4.5 all launched before that date. Anthropic's help centre says earlier models are “in progress” under a transition period, so this is a moving target rather than a switch that flipped.

That means code written with the models most people are using today carries no mark at all, regardless of the entropy question.

Questions

Can my employer scan our repo for Claude-written code?
Not with a public watermark detector. Anthropic's detector is restricted to an eligible private preview. Employers can still inspect commit history and review the code, which is what actually happens in practice.
Does running the code through a formatter remove the mark?
Formatting normalises whitespace and layout, which removes some of the token choices a mark would ride on. Public tools cannot measure how much survives without Anthropic's restricted detector, so treat confident claims in either direction with suspicion.
Is a code comment more markable than the code itself?
Yes, in principle. Comments and docstrings are prose and carry far more entropy than the surrounding syntax, so they are the part of a file where a distributional signal would be strongest.

Check your own text. Free, unlimited, no account, and it runs in your browser so nothing is uploaded.

Check and remove AI traces
Product Hunt — featuredProduct Hunt — featuredNick Launches — featuredNick Launches — featuredDang.ai — featuredDang.ai — featuredFazier — featuredFazier — featuredStartup Fame — featuredStartup Fame — featuredTurbo0 — featuredTurbo0 — featuredTinyLaunch — featuredTinyLaunch — featuredToolPilot — featuredToolPilot — featuredTwelve Tools — featuredTwelve Tools — featuredProduct Hunt — featuredProduct Hunt — featuredNick Launches — featuredNick Launches — featuredDang.ai — featuredDang.ai — featuredFazier — featuredFazier — featuredStartup Fame — featuredStartup Fame — featuredTurbo0 — featuredTurbo0 — featuredTinyLaunch — featuredTinyLaunch — featuredToolPilot — featuredToolPilot — featuredTwelve Tools — featuredTwelve Tools — featured