fix: CLAUDE.md tells agent to update itself instead of AGENTS.md#168
Open
fix2015 wants to merge 1 commit into
Open
fix: CLAUDE.md tells agent to update itself instead of AGENTS.md#168fix2015 wants to merge 1 commit into
fix2015 wants to merge 1 commit into
Conversation
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.
|
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:
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.