Repository navigation
docs: remove redundant CLAUDE.md imports - #4287
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
Without these shims, a contributor who has a CLAUDE.local.md in the checkout loses every repo instruction, with no warning. Per Claude Code's AGENTS.md docs, a CLAUDE.local.md in the working directory or above it counts as a CLAUDE.md, and that turns off the AGENTS.md fallback. The imports protected against this. The same docs say Claude Code before v2.1.277 (released 2026-09-18), or with the built-in agents-md plugin disabled, reads only CLAUDE.md. They suggest keeping an import-only CLAUDE.md "if some of your sessions can't load AGENTS.md directly". The repo can't choose a mode for contributors, because instructionFiles is ignored in project settings.
This is all or nothing. In the default mode, an AGENTS.md is read directly only when no CLAUDE.md exists in that directory or any directory above it. Keeping just the root CLAUDE.md would therefore stop the nested AGENTS.md files from loading. The options are to merge this PR as it is, accepting the gap above, or to keep all nine shims. Keeping them costs nothing: the docs say an import never loads AGENTS.md twice.
Claude Code reads the existing AGENTS.md files directly, so remove the nine one-line CLAUDE.md imports that duplicate them.