While investigating issue #51, I have realized that CLAUDE.md is appended to the system prompt at every invocation. However, this seems superfluous, because CLAUDE.md should be loaded into every session automatically.
Background
As per the official Claude Code Documentation, Claude Code has two complementary memory systems. CLAUDE.md and auto memory. Both are loaded at the start of every conversation.
Conflict
The contents of CLAUDE.md appear twice: in the system prompt and in the conversation. I am not sure what happens at compaction with the contents of CLAUDE.md that were previously injected into the conversation.
Proposed Change
I propose maintaining the agents' instructions in separate files, like IDENTITY.md, SOUL.md, ...
While investigating issue #51, I have realized that
CLAUDE.mdis appended to the system prompt at every invocation. However, this seems superfluous, becauseCLAUDE.mdshould be loaded into every session automatically.Background
As per the official Claude Code Documentation, Claude Code has two complementary memory systems.
CLAUDE.mdand auto memory. Both are loaded at the start of every conversation.Conflict
The contents of
CLAUDE.mdappear twice: in the system prompt and in the conversation. I am not sure what happens at compaction with the contents ofCLAUDE.mdthat were previously injected into the conversation.Proposed Change
I propose maintaining the agents' instructions in separate files, like
IDENTITY.md,SOUL.md, ...