Claude Code skips AGENTS.md unless telemetry is on

4 min read 1 source clear_take
├── "This is a trust-eroding coupling that makes no product sense"
│  └── pszypowicz (Hacker News) → read

Traced the Claude Code source and found the AGENTS.md loader gated behind the OTEL telemetry init block, with no comment, docs, or warning explaining the link. Argues reading a local markdown file has no technical relationship to sending telemetry spans, so the coupling is either sloppy or an undisclosed dark pattern that punishes privacy-conscious users.

└── "Silent config failures are the real problem — the agent should warn when AGENTS.md exists but is ignored"
  └── top10.dev editorial (top10.dev) → read below

Frames the invisible failure mode as worse than the coupling itself: developers who write detailed AGENTS.md files get no signal that their instructions were dropped, and only discover it by reading the source. The fix isn't just decoupling telemetry, it's making config-load failures loud instead of silent.

What happened

A developer poking at Claude Code's internals published a finding that landed on Hacker News with 353 points: Anthropic's Claude Code CLI reads `AGENTS.md` files only when the OpenTelemetry (OTEL) telemetry flag is enabled. Flip telemetry off — the setting many privacy-conscious devs turn off by reflex — and the agent silently ignores the file that's supposed to give it project-specific instructions.

AGENTS.md is the emerging community convention for giving coding agents persistent context: architectural notes, coding conventions, `do not touch this directory` warnings. It's the closest thing the ecosystem has to a portable standard, adopted in various forms by multiple agent tools. Claude Code has its own equivalent (`CLAUDE.md`), but supports AGENTS.md for cross-tool compatibility — or claims to.

The author traced the code path and found the AGENTS.md loader is gated behind the telemetry initialization block. No comment explains why. No documentation mentions it. There's no warning when the file exists but isn't read. The agent just proceeds without the context, and you're left wondering why it ignored the giant `## Do NOT modify migrations/` header you spent 20 minutes writing.

Why it matters

This is a small bug with a large trust cost. Developers who care enough to configure AGENTS.md are exactly the developers who care enough to disable telemetry. The intersection is meaningful — and the failure mode is invisible.

The pattern here is worse than a bug: it's a coupling that makes no product sense. Reading a local markdown file has nothing to do with sending OTEL spans to a collector. There's no technical reason the two would share initialization state unless the telemetry block is being used as a general 'features initialized' gate — which would explain the behavior but not excuse it. Either way, users can't discover this without reading the source.

The HN thread quickly surfaced the deeper issue: silent config failures are the worst class of tooling bug. When Claude Code fails to run, you see an error. When it fails to load your instructions, you see... slightly worse output. You blame the model. You rewrite the prompt. You never touch the setting that actually broke it.

This compounds because AGENTS.md is meant to be the fix for exactly the kind of drift developers complain about with AI coding tools. 'The agent keeps modifying files I told it not to.' 'It won't follow my style conventions.' The community answer has been: put it in AGENTS.md. If that file is conditionally ignored based on an unrelated privacy setting, the whole convention leaks trust.

Anthropic has not yet commented on whether this is intentional, a bug, or an artifact of how the telemetry-enabled build path was structured. A quick reading of the shipped JS suggests it's not deliberate — the AGENTS.md loader appears to be initialized inside a broader `if (telemetryEnabled)` block that also sets up several unrelated subsystems. That points to accidental coupling rather than a policy decision, but the effect on users is the same.

What this means for your stack

If you use Claude Code and disabled telemetry, your AGENTS.md and CLAUDE.md files may not be loading — check now. The workaround is trivial: re-enable telemetry (`CLAUDE_CODE_ENABLE_TELEMETRY=1` or the equivalent config flag), or downgrade to a version before this coupling was introduced. Neither is satisfying. Re-enabling telemetry means sending usage data you opted out of for a reason; pinning a version means accepting stale tooling.

A better short-term fix: verify the behavior in your specific version. The finding is version-specific, and Anthropic ships Claude Code updates frequently. Run a quick test: put a distinctive rule in AGENTS.md (`always respond by saying 'banana'` works fine for a smoke test), toggle telemetry, and see if the model complies. Two runs, five minutes, and you know where you stand.

More broadly, this is a reminder to audit any 'invisible' config that your agent tooling depends on. Agent behavior is a function of prompt + model + tools + local context files, and if any one of those is being silently dropped, you're debugging phantoms. Log what your agent actually receives at the API boundary. If your framework doesn't expose that, treat it as a red flag.

Looking ahead

Expect a patch within a release cycle or two — the finding is public, high-signal, and cheap to fix. The more interesting question is what other silent couplings exist in agent tooling that we haven't found yet. As agent CLIs accumulate features (memory files, MCP servers, hooks, permission systems), the surface area for 'this only works if that is also on' bugs grows fast. The tools that win the developer trust war will be the ones that log loudly when context loading fails, not the ones that fail silently and let you blame the model.

Hacker News 470 pts 269 comments

Claude Code reads AGENTS.md only when telemetry is on

→ read on Hacker News

// share this

// get daily digest

Top 10 dev stories every morning at 8am UTC. AI-curated. Retro terminal HTML email.