2026-11-26 15:51 UTC

User reports Claude Code refusal varies with repository instruction files

state: expiredheat: lowuncertainty: mediumrelevance: mediumcoding-agents open-source-governance instruction-followingAnthropic

What is this?

A Reddit user reports testing Claude Code 2.1.312 with Sonnet 5.5 on the same small Python task under different repository rules. In the reported runs, Claude Code made changes when no policy was present; with an AI policy in CONTRIBUTING.md and AI_POLICY.md it reportedly stopped and explained why; with AGENTS.md or CLAUDE.md it refused immediately. A commit hook blocking AI credit reportedly stopped the commit, and in one extra run the agent said an individual contributor could not waive the project rule. The linked article could not be independently checked: its retrieved text was a Reddit bot challenge. These results are a single user’s account, not a controlled or independently verified evaluation; the post says it tested no other agents and notes hooks can be skipped. The supplied search results include Anthropic documentation saying Claude Code can read an existing AGENTS.md in place of CLAUDE.md, but do not verify this test or its outcomes.

Why it matters

The report suggests that repository instructions can steer an agent away from work a project prohibits, which could help maintainers express contribution rules in tools agents actually read. But a single user’s test cannot establish dependable enforcement: the agent reportedly offered code in chat or another folder, and hooks are optional and bypassable. This is evidence about a possible governance aid, not a technical barrier to AI contributions.

Current assessment

New evidence is a Reddit post dated 2026-11-03, reporting several Claude Code runs and differences associated with repository instruction files. The named tool and model, test task, and observed behavior are claims by the poster; the supplied sources contain no independent replication or Anthropic confirmation. The linked article was inaccessible in the supplied retrieval, so its purported policy template and related materials cannot be assessed here. Anthropic documentation in the search results says Claude Code can read AGENTS.md in place of CLAUDE.md, supporting the relevance of those files to configuration, but not the reliability or specific refusal behavior claimed. Treat this as a bounded anecdote worth tracking if replicated across versions, repositories, and agents. The practical implication, if the behavior generalizes, is that explicit agent-facing rules may reduce accidental policy violations; they cannot alone prevent deliberate evasion, and an optional commit hook is not a security boundary.

Measured heat

no measured readings yet — the hourly heat pass fills this in

How the heat travelled

11-03 02:26⭐ origin directly observedHow Claude Code reacts when a repo has a no-AI contribution policy
vinishkapoor on r/ClaudeAI
—
11-03 02:26amplified on r/ClaudeAI 👑reddit.post.1xmgzia
vinishkapoor
peak 18 · 10 comments · 100% of case engagement
11-03 03:24our radar first saw it · +1.0hdiscovery anchor: reddit.post.1xmgzia—

Evidence (1) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟠 reddit ⭐How Claude Code reacts when a repo has a no-AI contribution policy
ClaudeAI
Retrieved article excerpt

Open article · Retrieved 2026-11-03T03:26:34.097132+00:00

# Prove your humanity

We’re committed to safety and security. But not for bots. Complete the challenge below and let us know you’re
a real person.

[Reddit, Inc. © "2026". All rights reserved.](https://www.redditinc.com/)

[User Agreement](https://www.reddit.com/help/useragreement)
[Privacy Policy](https://www.reddit.com/help/privacypolicy)
[Content Policy](https://www.reddit.com/help/contentpolicy)
[Help](https://support.reddithelp.com/hc/en-us)
vinishkapoor1810

Interpretation history

Decision trace