FOR DEVELOPERS

Claude Code watermark: Co-Authored-By and how to turn it off

Claude's text watermark hardly touches working code. What people notice in Claude Code is the visible attribution it writes into git, and that part is a setting you control.

Scan my text free Updated

Short answer

Claude's statistical watermark has a negligible effect on code, per Anthropic, though comments and docstrings can carry it. The visible Claude Code watermark is git attribution: a Co-Authored-By trailer on commits and a Generated with Claude Code line on PRs. Set "attribution": false in settings.json to turn both off.

CODE VS PROSE

Does Claude watermark code?

Anthropic answered this directly in its watermark announcement. The short version: exact code leaves no room for the mark, prose around it does.

But by definition, it will have a negligible effect on the actual code produced.
Source: Anthropic, on watermarking and code

LITTLE ROOM TO MARK

The code itself

Change a keyword or an operator and the program breaks, so the watermark has almost no equally good alternatives to choose between.

Illustration

def retry_delay(attempt: int) -> float:
    return min(30.0, 0.5 * 2 ** attempt)

ROOM TO MARK

The comment above it

The same idea could be phrased dozens of ways. Anthropic names comments inside code as a place the watermark can be used.

Illustration

# Back off exponentially so a flaky API
# gets breathing room, but never wait
# longer than thirty seconds per retry.

WHERE THE MARK CAN ACT

Every token is a choice. Code leaves almost none.

A watermark nudges which of several equally good words gets picked. Watch the highlighted token on each side and the options it really has.

Illustration

Illustration: in the code line every token has one correct value, so a watermark has almost nothing to choose between. In the comment each phrase has several equally good wordings, which is where the mark can act.

OpenAI makes the same point about its own textGrain mark: its help center says code is harder to watermark, and the EU transparency code does not require marks on code snippets or on outputs under 200 tokens.

EVERY SIGNAL, ONE TABLE

Where does Claude Code leave a mark?

Seven things people call the Claude Code watermark, where each shows up, and the switch that controls it.

Signals Claude and Claude Code can leave in a repository
SignalWhat it isWhere it showsHow visibleHow to control it
Statistical watermark in codePattern in token choices, keyed by AnthropicGenerated source codeNegligible: code has few equally good choicesNone needed in practice
Statistical watermark in commentsSame pattern, more room to actComments, docstrings, READMEs, PR proseCan register on long proseWrite or rewrite prose yourself
Co-Authored-By trailerCo-Authored-By: <model> <noreply@anthropic.com>Every commit Claude Code makes, by defaultVisible to anyone reading git logattribution.commit or attribution: false
PR description lineGenerated with Claude Code, linking claude.comPull requests Claude Code opensVisible on the PR pageattribution.pr set to an empty string
Claude-Session trailerLink to the claude.ai sessionCommits and PRs from cloud or Remote Control sessionsVisible, and the link points at your sessionattribution.sessionUrl: false
C2PA credentialSigned metadata note.png, .jpg and .svg files Claude producesReadable by any C2PA-aware toolLost when metadata is stripped
Hidden charactersZero-width spaces and similarNot added by the watermark, per AnthropicOnly present if pasted in from elsewheregrep for them, then delete

Swipe to compare →

Statistical watermark in code

What it is
Pattern in token choices, keyed by Anthropic
Where it shows
Generated source code
How visible
Negligible: code has few equally good choices
How to control it
None needed in practice

Statistical watermark in comments

What it is
Same pattern, more room to act
Where it shows
Comments, docstrings, READMEs, PR prose
How visible
Can register on long prose
How to control it
Write or rewrite prose yourself

Co-Authored-By trailer

What it is
Co-Authored-By: <model> <noreply@anthropic.com>
Where it shows
Every commit Claude Code makes, by default
How visible
Visible to anyone reading git log
How to control it
attribution.commit or attribution: false

PR description line

What it is
Generated with Claude Code, linking claude.com
Where it shows
Pull requests Claude Code opens
How visible
Visible on the PR page
How to control it
attribution.pr set to an empty string

Claude-Session trailer

What it is
Link to the claude.ai session
Where it shows
Commits and PRs from cloud or Remote Control sessions
How visible
Visible, and the link points at your session
How to control it
attribution.sessionUrl: false

C2PA credential

What it is
Signed metadata note
Where it shows
.png, .jpg and .svg files Claude produces
How visible
Readable by any C2PA-aware tool
How to control it
Lost when metadata is stripped

Hidden characters

What it is
Zero-width spaces and similar
Where it shows
Not added by the watermark, per Anthropic
How visible
Only present if pasted in from elsewhere
How to control it
grep for them, then delete

Sources: Claude Code settings reference and Anthropic's watermark announcement, checked October 9, 2026.

WHAT THE SETTING CONTROLS

What Claude Code adds to a repo, and what one setting removes

Flip attribution and watch which layers change. Only the git and PR text is a switch. The watermark and file credentials are not.

.claude/settings.json
  • Commit trailerEvery commit, by defaultCo-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>No trailer on new commitsattribution setting
  • PR description linePull requests Claude Code opensGenerated with Claude CodePR body has no Claude lineattribution setting
  • Claude-Session trailerCloud and Remote Control sessionsClaude-Session: link to your claude.ai sessionNo session linkattribution setting
  • Comments and docstringsFree wording, room to markCan carry the statistical markstatistical watermark
  • Source codeExact tokens, little roomNegligible watermark effectstatistical watermark
  • C2PA credentialFiles Claude producesSigned metadata on .png, .jpg, .svgfile metadata
  • Hidden charactersOnly if pasted from elsewhereNone added by the watermarknot added

Orange rows are written by Claude Code and follow the attribution key. The rest stay as they are whatever the setting says. Sources: Claude Code settings reference and Anthropic's watermark announcement.

The trailer names the model

By default the trailer reads Co-Authored-By: followed by the model in use, such as Claude Sonnet 5, and noreply@anthropic.com. If Claude Code cannot confirm the version it writes Claude; for a non-Claude model behind a custom base URL it writes Claude Code.

BEYOND THE COMMIT

Your commits are handled. Now check the README.

Docs, comments and PR descriptions are prose, and prose is where invisible characters and AI phrasing pile up. Scan them in your browser before you publish.

  • 300 rewrite credits a month
  • 20,000 characters per request
  • .txt, .docx and .pdf files

SETTINGS.JSON

How to turn off Co-Authored-By Claude in Claude Code

All of this lives in the attribution key. Put it in .claude/settings.json for one repo or ~/.claude/settings.json for every project.

WATCH THE SETTING LAND

One key in settings.json, then a clean commit

Pick the form that matches your Claude Code version. The editor types the exact config from the steps below and the terminal shows the next commit message.

Illustration

No Co-Authored-By, no PR line, no session link

  1. 01

    Hide everything in one line

    On Claude Code v2.1.281 or later, this removes the commit trailer, the PR line and the session link.

    .claude/settings.json

    {
      "attribution": false
    }
  2. 02

    Use this form for older versions

    Versions before v2.1.281 reject the false value and skip the whole settings file. This shape works on both.

    Works on any version

    {
      "attribution": {
        "commit": "",
        "pr": "",
        "sessionUrl": false
      }
    }
  3. 03

    Or swap in your project's own tag

    Some projects want disclosure in a set format. This writes the Linux kernel Assisted-by tag instead and clears the PR line.

    Custom trailer

    {
      "attribution": {
        "commit": "Assisted-by: LLM",
        "pr": ""
      }
    }
  4. 04

    Know what overrides the setting

    Per the settings reference, attribution rules in CLAUDE.md or memory take precedence over these lines unless the line comes from managed settings. The old includeCoAuthoredBy key, deprecated since v2.0.62, is ignored once commit or pr is set.

CLEAN UP HISTORY

How to remove Claude trailers from existing commits

The setting only affects new commits. For ones already made, rewrite the messages, ideally before anyone else has pulled them.

BEFORE AND AFTER THE REBASE

What the rebase does to your commit list

Only commits after origin/main are replayed. Each loses the Claude co-author and gets a new hash. Pushed commits keep theirs.

Illustration

Every rewritten commit gets a new hash, so avoid this on shared branches.

  1. 01

    Find commits with a Claude trailer

    The -i flag catches both Co-Authored-By and Co-authored-by spellings.

    Terminal

    git log -i --grep="Co-Authored-By: Claude" --oneline
    git log --grep="^Claude-Session:" --oneline
  2. 02

    Fix the last commit

    This rewrites the latest message without the Claude lines and keeps everything else.

    Terminal

    git log -1 --format=%B \
      | grep -viE "^(co-authored-by: claude|claude-session:)" \
      | git commit --amend -F -
  3. 03

    Fix every unpushed commit

    Rebase replays each commit after origin/main and runs the same cleanup on it. Every rewritten commit gets a new hash, so avoid this on shared branches.

    Terminal

    git rebase origin/main --exec 'git log -1 --format=%B \
      | grep -viE "^(co-authored-by: claude|claude-session:)" \
      | git commit --amend -F -'
  4. 04

    Check for invisible characters

    Anthropic's watermark adds none, but pasted snippets can. The -P flag needs GNU grep, so on a Mac use ggrep from Homebrew, or git grep if your git has PCRE support.

    Linux

    grep -rnP "[\x{200B}-\x{200D}\x{FEFF}]" .

    Any git repo

    git grep -nP "[\x{200B}-\x{200D}\x{FEFF}]"

FOR THE PROSE IN YOUR REPO

Clean comments, docstrings and READMEs the same way you clean an essay

Code is mostly exact, so the part worth checking is the writing around it. ClaudeClean treats any pasted text alike.

01

> source text

Paste a README or comment block

Drop in Markdown, a docstring or a PR description, or upload a .txt file. 2,000 characters work without an account.

02

scan report

3 zero-width1 soft hyphencleanable signals2

Strip invisible characters

Zero-width spaces, byte-order marks, soft hyphens and homoglyphs are flagged and removed in your browser. Nothing is stored.

03

before → after

clearusefulanswer

Copied ✓

Rewrite prose, not code

The optional rewrite targets AI phrasing in documentation. It runs through OpenAI, is best effort, and is not meant for source code.

PRICING

Clean the text free. Rewrite more with Pro.

The scan and hidden-character cleanup are free. Pro adds room for rewrites and files.

PRO

CLAUDECLEAN PRO

ClaudeClean Pro

$5/ month

Cancel anytime.

  • 300 credits every month (≈300,000 characters of rewriting)
  • 20,000 characters per request
  • Clean .txt, .docx and .pdf files
  • Light / medium / strong intensity
  • Dashboard with history
Checking account…

Free: 10 credits a month with an account, or try 2,000 characters right here without one. Strong rewrites cost 2× credits.

OPEN SOURCE RULES

Do open source projects require AI attribution?

Some want a tag, some refuse AI code outright. Check the project before you strip or keep a trailer.

TRAILER ON, TRAILER OFF

Deleting the trailer moves no project into a different lane

The four policies quoted below, grouped by what they ask of AI-assisted code. Toggle the trailer and see what changes.

Your commit

Allowed with a disclosure tag

Linux kernelsame rule

Assisted-by: LLM tag, no AI Signed-off-by

Fix retry logic in upload queue

Co-Authored-By: Claude

Assisted-by: LLM

Needs approval first

NetBSDsame rule

LLM code presumed tainted, prior written approval from core

Fix retry logic in upload queue

Co-Authored-By: Claude

Not accepted

QEMUsame rule

Declines AI-derived contributions

Fix retry logic in upload queue

Co-Authored-By: Claude

Gentoosame rule

Forbidden since April 14, 2024

Fix retry logic in upload queue

Co-Authored-By: Claude

Grouping is ours, rules are each project's own. The kernel lane shows the tag its guidance asks for, which you can set through attribution.commit.

LINUX KERNEL

Disclose with Assisted-by

The kernel guidance says AI agents must not add Signed-off-by tags and asks for an Assisted-by: LLM tag, with tools like coccinelle or sparse appended.

QEMU

AI-derived code is declined

QEMU's policy declines contributions believed to include or derive from AI-generated content, naming ChatGPT, Claude, Copilot and Llama. Research and debugging use is allowed if output is not included.

GENTOO

Forbidden since 2024

The Gentoo council voted on April 14, 2024 to forbid content created with the assistance of natural language AI tools.

NETBSD

Presumed tainted

NetBSD's commit guidelines treat LLM-generated code as tainted, needing prior written approval from core before it is committed.

Removing a trailer does not change a project's rules

If a project bans AI code or requires a tag, deleting Co-Authored-By does not make a contribution compliant. ClaudeClean cleans characters and prose only. No detector result is promised.

WATCH

Where the commit step fits in Claude Code

Anthropic's own walkthrough of the explore, plan, code and commit loop. The commit at the end is where attribution gets written.

The Explore → Plan → Code → Commit workflow in Claude Code by Claude. Official Anthropic channel

YOUR CALL

Should you keep the Co-Authored-By Claude trailer?

There is no rule that you must keep it, and none that you must remove it. It depends on where the code goes.

Keep or replace it when

  • The project asks for disclosure. Use their format, for example the kernel's Assisted-by tag, through attribution.commit.
  • Your employer tracks AI use. Managed settings can enforce a line that CLAUDE.md cannot override.
  • You want an audit trail. git log --grep turns the trailer into a quick list of AI-assisted commits.

Remove it when

  • The repo is private and personal. The trailer is a default, not a license term.
  • A session link would leak. Claude-Session points at your claude.ai session; set sessionUrl to false.
  • Your team uses its own convention. Replace the line rather than mixing two disclosure styles.

FAQ

Claude Code watermark FAQ.

Barely. Anthropic says code gets generally less watermarking because it has to be exact, with a negligible effect on the code itself. Comments and docstrings, where the wording is free, can carry the statistical mark.
Set "attribution": false in .claude/settings.json on Claude Code v2.1.281 or later, or set commit and pr to empty strings on older versions. For commits already made, amend or rebase the messages before you push.
No. It is a visible git trailer Claude Code adds by default, naming the model and noreply@anthropic.com. The watermark is a statistical pattern in generated text that only Anthropic's key can detect.
Anthropic says its watermark adds no hidden characters. If you find zero-width characters in a repo, they came from a paste path or another tool, and a grep over U+200B to U+200D and U+FEFF will list them.
It has been deprecated since v2.0.62. Claude Code still honors includeCoAuthoredBy: false in older settings files but ignores it once attribution.commit or attribution.pr is set. New setups should use attribution.
It scans any pasted text in your browser for hidden characters, so comments, docstrings and READMEs work. The rewrite is built for prose, not code, and is best effort. No detector result is promised.