Skip to content

docs: link CLAUDE.md to AGENTS.md - #957

Merged
wgtmac merged 1 commit into
apache:mainfrom
manuzhang:agent/link-claude-md
Sep 23, 2026
Merged

wgtmac merged 1 commit into
apache:mainfrom
manuzhang:agent/link-claude-md

Conversation

@manuzhang

@manuzhang manuzhang commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

What

Check in CLAUDE.md as a symlink to AGENTS.md.

Why

Claude Code reads CLAUDE.md, not AGENTS.md, so it never picked up the
agent instructions this repository already maintains. The symlink keeps
AGENTS.md the single source of truth instead of duplicating its contents.

Behavior change

CLAUDE.md is now tracked, so it is no longer available for personal,
unshared instructions. Contributors who already have an untracked
CLAUDE.md need to move it aside before pulling, since git will not
overwrite it. On checkouts without symlink support (Windows with
core.symlinks=false), CLAUDE.md materializes as a text file containing
the path AGENTS.md.

Testing

Confirmed the file is committed with symlink mode 120000 and that reading
CLAUDE.md in a fresh checkout yields the contents of AGENTS.md.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings September 23, 2026 02:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings September 23, 2026 02:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Claude Code reads CLAUDE.md, so it did not pick up the shared agent
instructions in AGENTS.md. Check in CLAUDE.md as a symlink to AGENTS.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 23, 2026 02:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@manuzhang
manuzhang requested a review from wgtmac September 23, 2026 02:22
@zhjwpku

zhjwpku commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

I think Claude Code reads agents.md, https://github.com/anthropics/claude-code/tree/main/mods/agents-md

@manuzhang

Copy link
Copy Markdown
Member Author

I think Claude Code reads agents.md, https://github.com/anthropics/claude-code/tree/main/mods/agents-md

Okay, let me check again. It ignored instructions in the AGENTS.md this morning and costed me another round of tokens.

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't hurt to add this even if claude has said to respect AGENTS.md.

@wgtmac
wgtmac merged commit 2630339 into apache:main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants