Skip to navigation

Claude Code AI Attribution: Watermarking, Provenance and Commit Headers

In short: AI attribution is a policy and provenance question, not a magic watermark. Record what changed, who reviewed it and which model helped.

Published 19 min read
On this page

Direct answer

Record provenance in the change itself. A useful record names the task, the agent and exact model shown by the route, the generated diff, the human reviewer, the verification evidence and the final commit. Watermarks can support attribution, but they cannot replace that record.

Official: supported Claude outputs carry an imperceptible text watermark, and files can carry C2PA Content Credentials. A detected mark indicates that content may have been processed by Claude, not conclusive origin. No detected mark does not prove human authorship. Code has minimal watermarking because exact outputs constrain arbitrary word choices. Use commit records and review evidence as the practical system.

Attribution is more than a label

Attribution answers different questions depending on the audience. A reviewer may need to know which parts of a diff were generated. An auditor may need to know who approved the change. Readers may need disclosure under an organizational policy. A detector may claim to recognize a watermark. Those are separate layers.

Attribution layer Question it answers Evidence it needs
Assistance record Did an AI system help? Task and session record
Model identity Which exact model handled the request? ID shown by the actual route
Change provenance What text or code changed? Starting state and generated diff
Human review Who checked the result? Named reviewer and findings
Verification What behavior was tested? Commands, results and manual checks
Content credential What metadata travels with a file? C2PA data where supported
Watermark detection Does a statistical signal appear? Detector result with its limitations

A commit trailer can preserve the first three layers in version control. It cannot prove that the named reviewer understood the code, that the tests were strong or that a watermark survived editing. Tie those claims to their own evidence.

Official: Claude Code best practices recommend independent subagent review because the reviewer has not seen the reasoning behind the code. That supports the review layer of provenance. A record that says “AI-generated” without a reviewer or verification result leaves the important questions unanswered.

The Claude Code verification-done proof guide provides a practical acceptance packet. Link that packet from the change record instead of copying a long transcript into the commit message. The commit should stay readable while the evidence remains retrievable.

Attribution also intersects with licensing, but the two are not interchangeable. Watermarks do not grant permission to copy code. Commit trailers do not satisfy a dependency’s notice requirements. The Claude Code generated-code license compliance guide covers that separate review.

Attribution evidence map separating assistance records, generated diffs, human review, commit records and watermark signals.
Source: Official Claude watermarking and review documentation checked 2026-11-27. The map separates evidence layers; no single layer proves origin, review quality or legal permission.

What the watermark can and cannot establish

Official: supported Claude outputs carry an imperceptible text watermark, and files can carry C2PA Content Credentials. Marking applies across Claude Platform, Claude, Claude Code, Cowork and Tag, with partner coverage where supported. That is a broad marking program, not a guarantee that every artifact carries a detectable signal.

A detected watermark indicates that content may have been processed by Claude. The word “may” matters. It is evidence consistent with Claude processing, not conclusive proof of which person, model or session produced the text.

The opposite result is equally limited. No detected mark does not prove human authorship. Official: heavy editing, paraphrase, translation, short passages and stripped metadata can remove or weaken the signal. Detection is in private preview for eligible organizations, so access and coverage are not universal.

Watermark situation Safe conclusion Unsafe conclusion
Signal detected Content may have been processed by Claude A specific person or model definitely authored it
No signal detected The detector found no usable signal The content is certainly human-written
Heavy editing present The signal may be weakened or removed The original source is now knowable from the mark
Short passage Detection may be limited The text must be original
Metadata stripped File credentials may no longer travel The content has no provenance record elsewhere

Code needs an especially cautious reading. Official: Anthropic’s technical explanation says code has minimal watermarking because exact outputs constrain arbitrary word choices. A function that must return a precise value does not leave unlimited room for hidden word selection. Do not claim that every generated line can be reliably detected.

C2PA Content Credentials are a different mechanism from a statistical text watermark. A file credential can carry provenance metadata where supported. It can also be stripped or separated from the content during editing and distribution. Treat it as one record in a larger evidence chain.

The Claude Code privacy and retention rules guide is relevant when provenance records contain prompts or repository context. A useful record should reference approved evidence without spreading sensitive material into public commit history.

Build a provenance record that survives the session

A session can end, a model can change and a local transcript can be cleaned up. The change record should survive those events. Store it beside the work in a form another developer can inspect without reopening the original chat.

Start with the task. Record the problem, the acceptance rule and the repository state before the change. A vague label such as “AI cleanup” cannot explain why files moved or what behavior was expected.

Next record the route. Use the exact model ID shown by the response or client. If the route reports only an alias, preserve the alias and mark the underlying ID unknown. Do not guess a model version from memory or from the product’s general marketing name.

Then record the generated change. A diff against the starting commit is more useful than a list of files. If several attempts were discarded, keep the accepted diff and a short note about rejected approaches. There is no need to preserve every token of reasoning.

Add the human layer. Name the reviewer, the findings they resolved and the verification they performed. Official: independent review is recommended because a fresh reviewer has not seen the reasoning behind the code. The record should show that freshness rather than imply that the author reviewed their own output twice.

Finish with the outcome. Link the final commit, tests, manual checks and any remaining limitation. The Claude Code proof-of-work packet guide provides a structure for that evidence.

Provenance field What to record Boundary
Task ID Issue, ticket or local task name Avoid sensitive customer data
Starting commit Exact repository baseline Makes the diff reproducible
Agent and route Tool name and endpoint context Do not include credentials
Model ID Exact ID shown, or unknown Never infer an unshown version
Prompt reference Approved prompt or task brief Prefer a link over raw secrets
Generated diff Change proposed by the agent Separate from later human edits
Human edits Material corrections after generation Keep authorship understandable
Reviewer Named person or accountable role A name alone does not prove review
Verification Tests, commands and manual checks Record failures and gaps
Final commit Immutable change reference Connects evidence to delivery

The Claude Code session handoff and team context guide explains why a portable brief should carry decisions rather than a raw transcript. Provenance follows the same principle: preserve the facts that change a later audit or review decision.

Use commit headers as a local convention

Git commit messages can carry structured trailers at the end. Teams often call these headers informally, but they are not a universal Git identity standard. Define the convention in the repository and apply it consistently.

A simple trailer might record assistance, model identity, review status and an evidence link. The exact field names are a local policy choice, not an Anthropic requirement. Limit them to short fields so ordinary commits remain readable.

Assisted-by: Claude Code
Model-ID: <exact ID shown by the route>
Review-status: human-reviewed
Evidence: <approved internal reference>

The placeholder must be replaced with evidence from the actual run. When the model ID is not exposed, write Model-ID: unknown rather than inventing one. Without human review, record Review-status: unreviewed and do not merge work that requires review under your policy.

Do not fabricate a person, email address or co-author identity for a model. A trailer that claims a named person wrote code they did not write damages the record. If repository policy requires a different disclosure format, follow that policy and keep the provenance link.

Commit trailers are not a secure signature. Anyone with write access can edit them. For a stronger chain, store the evidence in a protected system and reference its immutable record from the commit. The Claude Code settings-file secret exposure guide explains why local configuration should not become a source of leaked credentials.

Checkpointing can help reconstruct a file change, but it is not a provenance guarantee. Official: Claude Code tracks file edits with retention of 30 days or 100 snapshots. Bash-only changes, subagent edits, external modifications, symlinks and mid-turn messages are not fully tracked. The Claude Code rewind and checkpoint limits guide explains the boundary.

A restored file does not identify who reviewed it or whether a remote side effect occurred. Store the commit, review record and external-state evidence separately. Together they form a stronger account than any single local snapshot.

Provenance workflow moving from prompt and starting commit through generated diff, human review, verification and commit record.
Source: Derived provenance workflow from official review and checkpoint guidance checked 2026-11-27. The workflow records evidence; it does not create a universal attribution standard.

Choose a policy before the first disputed change

A policy should say what the team records, where it stores the record and who can see it. It should also say what the record does not prove. Without those boundaries, attribution can become a secrecy exercise or an unsupported public claim.

Internal policy may require assistance records for every AI-assisted change. External policy may require disclosure to a client, reader or regulator. The frozen evidence does not establish one universal disclosure obligation. Follow the contracts and rules that apply to the work, and involve counsel when the answer is legal rather than technical.

Policy choice Practical option Tradeoff
Recording threshold Every AI-assisted change or defined categories More coverage, more administrative work
Storage Commit trailer plus protected evidence link Portable summary, access-controlled detail
Model identity Exact ID, alias or unknown Precision depends on route visibility
Review requirement Named human before merge Clear accountability, reviewer capacity needed
Retention Match task and compliance needs Longer history, larger sensitive-data surface
Public disclosure Client contract or editorial policy Transparency, possible noise or confusion
Detector use Supporting signal only False certainty if treated as proof

Exclude prompts and repository content from public provenance records unless they are approved for release. The Claude Code secrets in logs and transcripts article explains how prompts, tool output and local transcripts can preserve secrets. Reference a protected record instead of copying raw material into the commit.

Access controls matter as much as retention. Official: the settings reference exposes transcript-retention and telemetry controls, but that does not mean every copy is removed by one switch. Review local files, shared evidence stores and support exports under the organization’s policy.

A detector result should carry its caveat. Store the detector name, date, scope and result if policy requires it. Do not turn a positive signal into a claim of exclusive authorship or a negative signal into an accusation. The official watermark documentation explicitly limits both interpretations.

The Claude Code harness security boundaries guide is useful when provenance tooling reads repository content. A script that scans commits or files is another component with access to data. Review what it logs and where it sends results.

A reusable provenance template

The following template is a practical starting point. It is not an official Anthropic form and does not prove legal compliance.

task: <issue or internal task ID>
starting_commit: <exact commit>
agent: Claude Code
route: <approved route description without secrets>
model_id: <exact shown ID or unknown>
prompt_ref: <protected reference>
generated_diff: <reviewable diff reference>
human_edits: <summary or none>
reviewer: <accountable person or role>
verification:
  tests: <commands and results>
  manual_checks: <what was exercised>
  known_gaps: <remaining uncertainty>
license_review: <status and reference>
watermark_or_credentials: <observed, absent or not checked>
final_commit: <exact commit>

Use the template at the level of detail the task needs. One-line documentation fixes should not require the same evidence packet as production migrations. Risk-based policies can scale the record without making it optional for high-impact work.

Bug fixes need the failing reproduction and the passing check after the patch in the verification field. Refactors need a record of behavior that remained unchanged. Features need the user-visible acceptance path. The Claude Code verification-done proof guide explains why a green test alone may be insufficient.

When the route changes, preserve the old record. The Claude Code custom API base URL guide explains why endpoint configuration affects where requests go. A later migration to another model or gateway should not rewrite the identity of an earlier run.

The OpenAI versus Anthropic API format guide explains why model and usage fields can differ between routes. A provenance importer should preserve unknown values rather than coercing every provider into a guessed Claude model name.

Attribution tradeoff comparing a watermark signal, a commit trailer and a full provenance packet by evidentiary strength and limitation.
Source: Official watermark limitations plus derived record-design guidance checked 2026-11-27. The visual does not rank detectors or claim that any record proves authorship conclusively.

Keep attribution separate from licensing and security

Attribution records who or what helped. Licensing asks whether the team may use and distribute the material. Security asks whether the change preserves the system’s boundaries. A single “AI-assisted” label cannot answer all three.

Independent: research on license compliance in LLM-generated code finds room for improvement, but it does not establish a Claude Code-specific violation rate. The Claude Code generated-code license compliance guide provides the dependency and copied-code review workflow.

Commit trailers do not replace required license notices. C2PA credentials do not grant permission to copy a snippet. Watermarks do not show that a dependency’s conditions were met. Retain the license review status in the provenance record, but perform the review separately.

Security review has its own authorization boundary. The Claude Code security-research refusal workflow article explains why permission to test is part of the test. A provenance record can document the approved scope, but it cannot authorize an otherwise prohibited action.

Tool output can also carry untrusted instructions. The Claude Code repository prompt injection and Claude Code MCP trust boundaries guides explain why content from files and tools should not become privileged instructions. Attribution does not make that content trustworthy.

Plugins deserve the same separation. The Claude Code plugin security audit guide covers hooks, commands, MCP servers and updates. A plugin can influence a generated diff, so record its version when it materially affects provenance. Do not assume every plugin is malicious, but do not omit executable configuration from the review.

A policy checklist for reviewers

Reviewers need a short checklist that connects the record to the actual change. Use it before merge when policy requires AI attribution.

  1. Confirm the task and starting commit are identified.
  2. Confirm the model field matches the route’s evidence or says unknown.
  3. Inspect the generated diff separately from later human edits.
  4. Confirm a named reviewer addressed material findings.
  5. Check that verification covers the acceptance rule, not just syntax.
  6. Record known gaps and unresolved risks.
  7. Keep secrets and raw sensitive prompts out of the commit.
  8. Check license and security review status separately.
  9. Treat watermark or C2PA results as supporting evidence only.
Review checkpoint Pass condition If missing
Identity Exact shown model ID or unknown Do not invent a version
Diff Proposed change is reviewable Request a bounded diff
Human review Accountable reviewer recorded Keep unreviewed status visible
Verification Acceptance evidence linked Do not call the work verified
Privacy Record contains no exposed secrets Redact and review retention
Licensing Required review status present Route to the license workflow
Watermark claim Caveat stated Remove conclusive-origin language

The Claude Code code-review bottleneck guide explains why review capacity and evidence quality belong together. A provenance policy that creates unreadable commits or huge review packets can become another bottleneck. Keep the summary small and the evidence linked.

When a teammate takes over, use the Claude Code session handoff and team context format. Carry the decision, constraints and next action. The provenance record should make the handoff easier, not replace it with a data-entry exercise.

Attribution control checklist covering task identity, exact model evidence, generated diff, human review, verification and privacy.
Source: Derived review checklist from official watermark, review and settings guidance checked 2026-11-27. The checklist supports accountability; it does not certify authorship or legal compliance.

Honest loss and data gaps

The concrete win is a durable account of how a change was produced and reviewed. Another developer can inspect the diff, identify the route and model evidence, see who approved the work and find the verification packet without reopening a private chat.

The concrete loss is imperfect detection and incomplete records. Watermarks can weaken or disappear. Code has minimal watermarking. Model identity may be hidden behind an alias. A commit trailer can be edited, and a reviewer’s name does not prove careful review.

Unknown: the frozen evidence does not provide a universal attribution standard, a detector accuracy rate for Claude Code output or a guarantee that every file carries C2PA metadata. It also does not establish a universal legal disclosure requirement. Those gaps require current official documentation, organizational policy and legal review where appropriate.

Update the policy when marking coverage, detector access or repository requirements change. Keep the underlying provenance fields stable so earlier records remain readable. A new detector should add evidence, not rewrite the history of what the team knew at merge time.

The practical implication is to stop asking a watermark to do a database’s job. Record the change, the route, the reviewer and the evidence. Use content credentials and detection as supporting signals with explicit limits. That produces an attribution practice a team can defend without pretending certainty it does not have.

Attribution verdict showing provenance records and human review as the durable system while watermark detection remains limited supporting evidence.
Source: Official Claude watermarking limits plus derived provenance guidance checked 2026-11-27. The verdict does not claim universal detection, conclusive origin or automatic license compliance.

Practical alternative: preserve route identity in comparisons

One AI API Key can support a controlled comparison in an OpenAI-format agent. On 2026-11-27, the 46 live free model IDs covered 22 families. They shared 100 requests and 5,000,000 tokens per day per account, resetting at 05:30 IST or 00:00 UTC. Accounts could have up to three keys, with one request in flight per key on free models.

Use an OpenAI-format agent such as OpenCode, Cline or Cursor with https://api.oneaiapikey.com/v1, one key and a selected free ID. The endpoint quickstart shows the base URL and first request. Review the prepaid pricing before paid evaluation; new accounts received $10 credit without a card under the frozen evidence.

Do not use these free IDs in Claude Code. They are OpenAI-format only. Claude Code’s documented route uses the Anthropic Messages format, but all four Claude IDs were unavailable on 2026-11-27. The coding-agent API key compatibility guide explains the boundary.

For provenance, record the exact selected free ID and the OpenAI-format agent rather than labeling the run as Claude Code. Do not transfer Claude watermark claims to another provider’s output. The current model catalogue and availability can help identify the route, while the response evidence establishes what actually ran.

Use per-key caps, expiry and model allowlists to constrain the test, and read the gateway privacy and retention policy before sending code. The honest loss is that another agent may expose different identity and usage fields. A comparison can still be useful if unknown values remain unknown and the same review evidence is collected.

Follow the evidence to the right control

Context failures need a different record from attribution failures. Continuity appears in the Claude Code session handoff and team context and Claude Code compaction context-retention test guides. Access constraints appear in the Claude Code mobile Remote Control limits and Claude Code offline-mode boundaries guides.

Scope and destructive operations remain separate. Read the Claude Code overengineering and diff scope, Claude Code dependency-install side effects, Claude Code database migration safety and Claude Code gitignored-file deletion risks guides before accepting a broad diff. The Claude Code rewind and checkpoint limits article explains recovery gaps.

Trust and privacy need their own controls. Untrusted content and retained data appear in the Claude Code repository prompt injection, Claude Code MCP trust boundaries, Claude Code plugin security audit and Claude Code secrets in logs and transcripts guides. Authorization appears in the Claude Code security-research refusal workflow and Claude Code game-development IP restrictions articles.

Platform and service failures can interrupt evidence collection. Use the Claude Code Linux ARM and headless login, Claude Code macOS Keychain permissions and Claude Code PowerShell path quoting guides for setup. The Claude Code network storm and NAT retry diagnosis, Claude Code corporate proxy TLS and mTLS and Claude Code outage status and failover articles cover connectivity.

Performance and economics do not prove provenance. Request behavior appears in the Claude Code prompt-cache minimums, Claude Code thinking tokens and output caps and Claude Code reasoning effort defaults guides. Billing is separated in the Claude Code annual plan lock-in analysis, Claude Code Max and Ultra tier value, Claude Code fast-mode speed and cost and Claude Code Batch API versus subscription guides.

For delivery quality, read the Claude Code code-review bottleneck and Claude Code generated-code license compliance guides. Attribution, acceptance and permission are related records, but none substitutes for the others.

FAQ

Is every Claude Code output watermarked?

No. Official documentation describes marking for supported outputs, but code has minimal watermarking and detection has limits. Do not claim that every generated line is reliably detectable.

Does a detected watermark prove Claude wrote the content?

No. A detected mark indicates that content may have been processed by Claude. It does not conclusively establish origin, a specific model or a specific person.

Does no watermark mean the content is human-written?

No. Heavy editing, paraphrase, translation, short passages and stripped metadata can remove or weaken the signal. Detection is also in private preview for eligible organizations.

What should a commit attribution record contain?

Record the task, starting commit, exact shown model ID or unknown, generated diff, human edits, reviewer, verification evidence and final commit. Treat the field names as a local convention, not a universal standard.

Can the 46 free gateway IDs be used in Claude Code?

No. They are OpenAI-format only and require an OpenAI-format agent. The documented Claude Code route uses the Anthropic format, and all four Claude IDs were unavailable on 2026-11-27.

Sources

More in Blog

Try it

One API key for GPT, Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen, Step, Beam, Nemotron, ERNIE, Hunyuan, Gemma, Laguna, LFM, LongCat, Llama, Solar, Jais, Mistral, K2 and Roleplay.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.

New accounts$10 credit on sign-up
  • 100requests
    per day
  • 3Mtokens
    per day
  • 47free
    models
  • $0per
    token
  • No card
  • No end date
Claim $10 credit →