메뉴
HN
Hacker News • 2일 전

Claude Code, 텔레메트리가 꺼져 있으면 AGENTS.md를 읽지 않음

IMP
7/10
핵심 요약

Claude Code의 AGENTS.md 지원 기능은 원격 기능 플래그(tengu_agents_md_mod)에 의존하는데, 텔레메트리나 비필수 트래픽을 비활성화하면 플래그를 가져올 수 없어 로컬 파일임에도 AGENTS.md가 아예 로드되지 않습니다. 아무런 경고도 없이 조용히 무시되기 때문에 사용자는 모델이 지시를 무시한다고 오해하기 쉽습니다. 해결책은 CLAUDE.md에 '@AGENTS.md' 한 줄을 추가하는 것이지만, 이는 AGENTS.md 지원이 없애려 했던 파일을 하나 더 만드는 셈입니다.

번역된 본문

Claude Code 2.1.277은 AGENTS.md 지원을 발표했습니다. CLAUDE.md가 없는 프로젝트에서는 대신 AGENTS.md를 읽도록 되어 있습니다. 저는 셸에서 텔레메트리를 꺼두고 있는데, 제 저장소에서는 이 파일이 절대 로드되지 않았습니다. 이슈 #95690이 그 이유를 설명하고 있으며, 제 측정 결과를 거기에 추가했습니다. 이 글은 그 내용을 한곳에 모은 것입니다.

게이트(차단 지점)가 어디에 있나

로더는 agents-md라는 내장 플러그인으로 배포됩니다. 2.1.280 번들에서의 등록 코드는 다음과 같습니다:

var W = !1; var B = () => Oa("tengu_agents_md_mod", W); var H = "AGENTS.md as project instructions: by default loaded where the project has no CLAUDE.md; ...";

W는 플러그인의 isOnByDefault 값으로 false입니다. B는 isAvailable인데, tengu_agents_md_mod라는 원격 기능 플래그를 조회하며 폴백 값은 false입니다. Claude Code가 이 플래그를 가져올 수 없으면 플러그인을 사용할 수 없고, 로컬 파일은 절대 읽히지 않습니다. 작업 디렉터리에서 마크다운 파일 하나를 읽는 데는 네트워크가 전혀 필요 없지만, 여기서는 서버 측 스위치를 기다리고 있습니다.

테스트 방법

카나리아 단어가 담긴 AGENTS.md만 있는 빈 디렉터리를 만들고, claude -p로 그 단어를 물었습니다. 새 설정에서 첫 번째 세션은 플래그만 가져오고 두 번째 세션부터 사용하기 때문에 각 설정을 두 세션에서 실행했습니다.

echo 'The canary word is PERIWINKLE.' > AGENTS.md claude -p 'What is the canary word from the project instructions? Answer NONE if you have none. Do not read files.'

측정 결과

CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1은 이슈에서 언급된 대로 이 기능을 차단합니다. DISABLE_TELEMETRY=1도 마찬가지입니다. 두 변수 중 하나만 설정해도 AGENTS.md는 로드되지 않아서 둘 다 해제해야 했습니다. 변수를 0으로 설정하는 것은 소용없습니다. 차단은 그대로 유지됩니다. 환경 변수 문서에는 어떤 값이든 설정된 것으로 간주된다고 나와 있지만, 기능을 켜려는 사람은 이걸 놓치기 쉽습니다.

프로젝트의 .claude/settings.json에서 두 변수를 해제하는 env 블록은 효과가 없습니다. 단일 저장소에 대해서만 이 기능을 켜는 방법은 없습니다. 세션 수준 오버라이드는 두 번째 세션부터 작동합니다:

claude --settings '{"env":{"DISABLE_TELEMETRY":"","CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":""}}'

이 모든 경우에 경고가 출력되지 않습니다. 세션은 시작되고, 모델은 프로젝트 지시 없이 답하며, 파일이 건너뛰어졌다는 알림은 없습니다. 이슈에서는 서드파티 게이트웨이, Bedrock, Vertex도 같은 문제가 있다고 지적합니다. 그 환경에서는 플래그가 true로 확인될 수 없기 때문입니다.

해결 방법

CLAUDE.md는 @path 임포트를 지원하며, 이는 플래그에 의존하지 않습니다. AGENTS.md 옆에 한 줄짜리 CLAUDE.md를 두면 텔레메트리가 꺼져 있어도 로드됩니다:

echo '@AGENTS.md' > CLAUDE.md

이 파일이 있으면 CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1이 설정된 상태에서도 같은 카나리아 테스트가 단어를 반환합니다. 대가는 저장소당 파일 하나 추가인데, 그것이 바로 AGENTS.md 지원이 없애려고 했던 것입니다.

왜 이것이 받아들일 수 없는가

저는 의도적으로 텔레메트리를 껐고, 그 선택의 대가는 일부 진단 정보 정도일 것으로 기대했습니다. 그런데 여기서는 제 디스크에 있는 파일을 읽는 기능이 조용히 사라집니다. 서버와 통신하는 기능이라면 원격 플래그가 의미 있을 수 있지만, 이 기능이 필요로 하는 유일한 입력은 이미 작업 디렉터리에 있습니다.

이 게이트는 AGENTS.md를 가장 신경 쓸 만한 사람들에게 정확히 영향을 줍니다. 여러 에이전트를 위해 하나의 지시 파일을 유지하는 사람은 보통 각 도구가 무엇을 전송하는지 민감하고, Bedrock, Vertex, 게이트웨이를 쓰는 팀은 정책상 비필수 트래픽을 비활성화하는 경우가 많습니다. 이 사람들 모두 '사용 가능'하다고 발표된 기능이 아무것도 하지 않는 것을 겪게 됩니다.

최악은 침묵입니다. 저는 카나리아 단어와 바이너리 문자열 검색으로 원인을 확인했지만, 대부분은 그렇게 하지 않을 것입니다. 그들은 모델이 자신의 지시를 무시한다고 결론 짓고, 파일이 애초에 모델에 도달하지도 않았는데 프롬프트에 시간을 낭비할 것입니다. 프라이버시 설정이 관련 없는 로컬 동작을 조용히 꺼버려서는 안 됩니다. Anthropic이 이것을...

원문 보기
원문 보기 (영어)
Claude Code 2.1.277 announced support for AGENTS.md . In a project with no CLAUDE.md , it is supposed to read AGENTS.md instead. I keep telemetry off in my shell, and in my repos the file never loaded. Issue #95690 explains why, and I added my own measurements to it. This post collects them in one place. Where the gate is The loader ships as a built-in plugin called agents-md . Its registration in the 2.1.280 bundle looks like this: var W = ! 1 ; var B = () => Oa ( "tengu_agents_md_mod" , W ); var H = "AGENTS.md as project instructions: by default loaded where the project has no CLAUDE.md; ..." ; W is the plugin’s isOnByDefault value and it is false . B is isAvailable , and it asks a remote feature flag called tengu_agents_md_mod , with false as the fallback. When Claude Code cannot fetch the flag, the plugin is unavailable, and the local file is never read. Reading a markdown file from the working directory needs no network at all, but here it waits on a server-side switch. How I tested it I made an empty directory that holds only an AGENTS.md with a canary word in it, and asked claude -p for the word. Each setup ran in two sessions, because the first session in a new configuration only fetches the flag and the second one uses it. echo 'The canary word is PERIWINKLE.' > AGENTS.md claude -p 'What is the canary word from the project instructions? Answer NONE if you have none. Do not read files.' What I measured CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 blocks the feature, as the issue says. DISABLE_TELEMETRY=1 blocks it too. With either variable set, AGENTS.md never loaded, so I had to clear both. Setting either variable to 0 does not help. The block stays in place. The environment variable docs say that any value counts, but that is easy to miss when you try to turn a feature on. An env block in the project’s .claude/settings.json that clears both variables has no effect. There is no way to turn the feature on for a single repo. A session-level override does work from the second session on: claude --settings '{"env":{"DISABLE_TELEMETRY":"","CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC":""}}' None of these cases print a warning. The session starts, the model answers without the project instructions, and nothing tells you that a file was skipped. The issue also points out that third-party gateways, Bedrock and Vertex have the same problem, because the flag cannot resolve to true there either. The workaround CLAUDE.md supports @path imports, and those do not depend on the flag. A one-line CLAUDE.md next to the AGENTS.md loads it with telemetry off: echo '@AGENTS.md' > CLAUDE.md With that file in place, the same canary test returns the word with CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 still set. The cost is one extra file per repo, which is what the AGENTS.md support was supposed to remove. Why I think this is unacceptable I turned telemetry off on purpose, and I expect that choice to cost me some diagnostics and nothing else. Here it silently costs me a feature that reads a file from my own disk. A remote flag can make sense for a feature that talks to a server, but the only input this one needs is already in the working directory. The gate also hits the people who are most likely to care about AGENTS.md . Someone who keeps one instruction file for several agents is usually careful about what each tool sends home, and teams on Bedrock, Vertex or a gateway often disable nonessential traffic by policy. They all get a feature that is announced as available and then does nothing. The silence is the worst part. I confirmed the cause with a canary word and a string search through the binary, and most people will not do that. They will conclude that the model ignores their instructions, and they will spend time on prompts when the file never reached the model in the first place. A privacy setting should never quietly switch off unrelated local behavior. If Anthropic wants a staged rollout, the fallback for a flag that cannot be fetched should be the documented behavior, or at least a visible message that says what was skipped and why. What I would like to see Reading a local file should not depend on telemetry. If the gate has to stay for a gradual rollout, a startup warning when an AGENTS.md is present and skipped would save people the time I spent on a canary test. A global AGENTS.md . The plugin looks for AGENTS.md and .claude/AGENTS.md in project directories only, and there is no user-level file next to the user CLAUDE.md . Codex reads a global ~/.codex/AGENTS.md , and the /import command in Claude Code can copy it into the user CLAUDE.md , but the copy does not follow later edits. If you keep one set of personal instructions for several agents, you still need an @ import in the user CLAUDE.md that points at the shared file. Native support for shared agent skills. Codex reads skills from .agents/skills in the project and from ~/.agents/skills in the home directory. Claude Code 2.1.280 knows those paths only in /import , which copies the skills into .claude/skills . I put a canary skill in .agents/skills and Claude Code did not list it, but it listed the same skill from .claude/skills in the same repo. A copy drifts from the source, so I link .claude/skills to ../.agents/skills instead, and Claude Code follows that symlink. Until then, I use the one-line CLAUDE.md for instructions and a symlink for skills.