Skip to content

agents-md: send the AGENTS.md loaded line to the debug log - #98275

Merged
poteat merged 1 commit into
mainfrom
poteat/agents-md-loaded-line-debug
Sep 30, 2026
Merged

poteat merged 1 commit into
mainfrom
poteat/agents-md-loaded-line-debug

Conversation

@poteat

@poteat poteat commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Summary

TLDR: a project with AGENTS.md and no CLAUDE.md starts with no new transcript row; the loaded line goes to the debug log

The no CLAUDE.md found; AGENTS.md loaded: <paths> line is sent with { to: 'debug' }. This mirrors the change built into Claude Code 2.1.286.

Notes

  • In a project that has AGENTS.md and no CLAUDE.md, the first prompt.context after the mod loads wrote a transcript row naming the files it loaded, once per project root. That is a healthy start, and a healthy start shows nothing new on screen. The same words now go to the debug log (claude --debug), once per root and again after a move to another root.
  • What the model receives is unchanged: the files still join the instruction files behind claudeMd.
  • /memory lists the AGENTS.md files the current context was built with, and /context all names them.
  • The README's two sentences about the line now say where it goes.
  • The "Mod tests" check is expected red until 2.1.286 is the public latest: the published test kit trails this folder.

Test Plan

  • claude plugin test mods/agents-md against the build this mirrors: 5 of 5. "by default a project with AGENTS.md alone gets it" expects the transcript's lines to be empty and the debug log's lines to be the one line; "by default a project with a CLAUDE.md is left to the engine" expects both empty. The startedOf fixture splits a ui.log by its to.
  • Revert-proof: with the old hooks/register.ts under the new test, the first case fails ("nothing new in the transcript", received the row); the other four pass.
  • Driven in the built binary: a project holding only AGENTS.md shows no row in the interactive pane, the request still carries the file framed as project instructions, and the debug file has the line once; the build before the change shows the row.

@poteat
poteat merged commit 2282079 into main Sep 30, 2026
1 of 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.

2 participants