Back to all rules / Drift between files
claude-local-hides-agents-md
A CLAUDE.local.md switches off the AGENTS.md fallback.
Source: claude-code issue 96117 (github.com), read 14 October 2026.
On GitHub: the rule doc and the tests.
Jump to another rule89
What it catches#
A CLAUDE.local.md switches off the AGENTS.md fallback.
An AGENTS.md where the only CLAUDE-style file in its folder or above is a CLAUDE.local.md (no CLAUDE.md or .claude/CLAUDE.md), and that local file does not import the AGENTS.md. Claude Code counts CLAUDE.local.md as a CLAUDE.md for the "is there a CLAUDE.md" check, so AGENTS.md stops loading for the person who has the local file, and only for them. Linting the AGENTS.md on its own is enough; the check looks at the folders around it.
Why it matters#
With only CLAUDE.local.md present, Claude Code stops reading AGENTS.md, so the shared instructions silently drop out (claude-code issue 96117).
Bad example#
AGENTS.md # shared instructions, committed
CLAUDE.local.md # "Use the staging URL https://staging.example.invalid", gitignored
On this machine Claude Code reads only the one-line local file. Teammates without a local file get AGENTS.md. The difference is invisible in the repository.
Good example#
<!-- CLAUDE.md, committed -->
@AGENTS.md
<!-- CLAUDE.local.md, gitignored -->
Use the staging URL https://staging.example.invalid
How to fix#
Add a committed CLAUDE.md that imports AGENTS.md, so every CLAUDE.md-style load includes the shared file. The quicker fix the message offers, putting @AGENTS.md at the top of your CLAUDE.local.md, works too, but only on your machine. Or type /config in Claude Code and set Project instructions to claude-md-and-agents-md, which reads both; that is a per-user setting, not something in the repository.
Suppress or configure#
For one finding, put a comment on the line above it. The reason after -- is optional but worth writing:
<!-- asitis-disable-next-line claude-local-hides-agents-md -- why this one is fine -->
For a whole file:
<!-- asitis-disable-file claude-local-hides-agents-md -- why this file is an exception -->
For every file, turn it off or change its severity in .asitisrc.json:
{ "rules": { "claude-local-hides-agents-md": "off" } }
A .asitisrc.json overrides entry limits a change to some paths, and a baseline (asitis lint --format json --write-baseline) accepts today's findings so only new ones fail the build.
Source#
claude-code issue 96117, read on 14 October 2026.
See what an agent changed in your CLAUDE.md. Keep or revert each change.
The linter is free and needs no signup. I'm also building a desktop editor for the markdown your agents write and read. It shows what an agent changed since you last looked, lets you keep or revert each change, and never touches a line you didn't edit. No release date yet. One email to confirm, one when the paid beta opens, one when 1.0 ships. $29 once for a founding licence, with 24 months of updates.
Or add the linter to CI, no email needed.
Your address is stored with Cloudflare, which hosts this site. No IP address is kept. See the privacy policy.
Related guides
Run the rule
- In your browser, on one file
- In Claude Code, on the project
- In CI, on every pull request
This page is generated from the plugin's rule registry. Edit it on GitHub. False positive? Open an issue with the line it fired on.