Does Claude Code Watermark Your Code?
Short answer: in compiled or runnable code, no. In comments, docstrings, error messages and other places where the exact wording is a choice, the mark can be applied and can survive.
- Type
- Statistical
- Hidden characters
- No
- Official detector
- Announced: Announced
- Locally removable
- No
The question underneath the question is usually narrower: will Claude Code embed a signal in my source that a compiler, a linter, or a CI check would trip over? It will not. But "code" is not one thing, and the parts of a repository made of prose behave like prose.
Anthropic's own rule for code
From the August 14, 2026 post:
"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. But in areas where there is an arbitrary choice between particular words or terms within the code, the watermark can be used, such as comments within code."
Translated into positions in a file: any token with exactly one correct value is skipped. Any token with several equally valid values is eligible.
What is marked, and what is not
Not marked: language keywords, standard library function names, an API name you asked for, string literals used as protocol values, numeric constants, and identifiers that existing code already references. Changing any of those would change behaviour, so the watermark leaves them alone.
Marked-eligible: comments, docstrings, commit messages Claude wrote, pull request descriptions, error message strings, log messages, README prose, test-name strings, and the long-form explanation Claude attaches to a diff. All of these are sentences with a free choice of wording, which is the raw material the mark uses.
Ambiguous: variable and function names Claude invents from scratch. They are a choice in one sense, since the name could have been different, but once written the surrounding code depends on them. Anthropic's rule prefers correctness over marking, so expect these to be unmarked. Treat them as Unknown rather than assuming either way.
Does it affect builds, linters, tests, or diffs?
Compilers: no. The mark cannot land on a position that would change behaviour, which is the whole point of the exception rule.
Linters: no direct signal. A linter has no key and no detector. If a linter flags something about comment phrasing, that is stylometry, and it would flag the same phrasing from a human who wrote in that style.
Tests: no. The watermark cannot appear in a value that must equal an exact expected output.
Diffs: yes, in the sense that reviewers see the wording Claude produced in comments and docstrings. That is visible to a person, not to a tool.
File-level provenance: Anthropic attaches signed C2PA metadata to files Claude generates, specifically SVG, PNG and JPG. Source files do not carry a C2PA manifest, so do not expect a signed block on a .py file.
The Co-Authored-By trailer is a different thing
Claude Code adds a Co-Authored-By trailer to commit messages it writes. This gets confused with the watermark constantly, and the two have nothing in common.
The trailer is visible attribution. It is a plain line of text at the bottom of a commit message, anyone can read it, anyone can delete it, and Claude Code has a setting to stop adding it. Removing it removes exactly one thing: the trailer.
The statistical watermark, if it is present in the wording of that commit message, is a separate mechanism with a separate fate. Deleting the trailer does not touch it. Nothing available today can tell you whether it was there in the first place.
Reproducibility is not the same question
People sometimes reason that if the watermark is deterministic, asking Claude for the same function twice should produce identical code, and a difference proves something.
It proves nothing. The keyed choice is deterministic given the same key and the same preceding text, but generation has other sources of variation, including sampling temperature. Two runs differing is the normal case with or without a watermark, and two runs matching is not evidence either.
What "remove Claude's watermark from code" tools actually change
The tools aimed at Claude Code output tend to do three things: strip the Co-Authored-By trailer, remove invisible Unicode if any is present, and in some cases run the comments through a paraphraser.
None of them can verify a result against Anthropic's mark, because there is no detection API to verify against. The most-starred repository in this category is explicit about its own scope, noting that its current release removes metadata only.
The paraphrase option is the only one that touches word choice, and it carries the obvious cost: comments rewritten by a second model say something slightly different from what the code does.
For maintainers, reviewers and journalists
A future positive watermark verdict on prose inside a pull request is evidence that Claude was involved in producing or processing that wording. It is not evidence of code plagiarism, a license problem, or a false authorship claim.
Anthropic's own framing applies here as everywhere: "A watermark only helps test whether Claude might have produced or processed the content." It does not identify a person, and it says nothing about ownership.
For teams using Claude Code
To turn off the visible attribution, use the Claude Code setting for the co-author trailer. That is a documented preference and takes effect on new commits.
To know whether comment prose carries the statistical mark: today, you cannot. Nobody can. When the API opens, code-region checks become possible and this article gets updated with what the check actually reports.
If a compliance requirement means some prose must not be Claude-marked, the only reliable route is the one Anthropic named: write it yourself, or rewrite it through a non-Claude model. Everything else is a guess with a progress bar.
Check the text you can check
Hidden characters, clipboard artifacts, lookalikes
FAQ
Only where the wording is a free choice. Keywords, identifiers, literals and anything that would break if a different token were picked are skipped.
A commit message Claude wrote is prose, so it is eligible for the mark in the same way any other generated sentence is.
No. That is a visible attribution trailer added to the commit message, and it can be switched off in Claude Code settings. The statistical mark is a separate mechanism.
No. A linter has no key and no detector. Anything a linter notices about phrasing is stylometry, not watermark detection.
Yes. Anthropic attaches signed C2PA metadata to generated files. Source files do not carry a C2PA manifest.
- 1. Anthropic: “How Claude’s text watermark works” (August 14, 2026)
- 2. Anthropic Help Center: “How Claude marks AI-generated content”
- 3. Claude Directory: how to remove the Co-Authored-By trailer
- 4. ExplainX: Claude Code commit co-author attribution guide (2026)
- 5. Guillaume Meyer: watermarks-remover repository README