Skip to content

fix: CLAUDE.md tells agent to update itself instead of AGENTS.md#168

Open
fix2015 wants to merge 1 commit into
snarktank:mainfrom
fix2015:fix/inconsistent-metadata-file-refs
Open

fix: CLAUDE.md tells agent to update itself instead of AGENTS.md#168
fix2015 wants to merge 1 commit into
snarktank:mainfrom
fix2015:fix/inconsistent-metadata-file-refs

Conversation

@fix2015

@fix2015 fix2015 commented Jul 3, 2026

Copy link
Copy Markdown

CLAUDE.md was telling the agent to "update CLAUDE.md files" with discovered patterns — but CLAUDE.md IS the prompt file for Claude Code mode. The agent would append patterns to its own instruction file, potentially corrupting the prompt on subsequent runs.

`prompt.md` and `AGENTS.md` both consistently reference AGENTS.md as the place to store patterns. Changed CLAUDE.md to match so both tool modes point to the same target file.

CLAUDE.md was telling the agent to "update CLAUDE.md files" with
discovered patterns, but CLAUDE.md IS the prompt file for Claude Code
mode — the agent would corrupt its own instructions. Changed to
reference AGENTS.md like prompt.md already does.
@Keesan12

Keesan12 commented Jul 7, 2026

Copy link
Copy Markdown

This is an important fix.

Having the agent write newly discovered patterns back into the same file that defines its live instruction authority is one of those bugs that looks harmless until a few runs later, when the prompt surface has quietly turned into an append-only memory dump.

The part I like here is not just changing the target file, but restoring a cleaner separation:

  • prompt / authority surface
  • learned-pattern surface
  • execution artifacts

Once those collapse into one file, instruction drift gets very hard to debug because the tool starts mutating the thing that explains its own behavior.

For loop-style agent systems, that separation usually matters more than it first appears.

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