Bug: Some custom modes load external CLAUDE.md instructions and lose their mode identity
Summary
We are seeing a mode-isolation problem in Kilo Code.
Two of our custom modes, Conrad and Anna, do not keep their own mode identity when started. Instead, they appear to load external instructions from C:\Users\terry\.claude\CLAUDE.md and then behave as a different agent/persona defined there.
Other custom modes in the same setup are not affected.
Environment
- OS: Windows
- Editor: VS Code
- Product: Kilo Code extension
- Global Kilo Code config:
C:\Users\terry\.config\kilo\kilo.jsonc
- External file present:
C:\Users\terry\.claude\CLAUDE.md
CLAUDE.md is a symlink to: P:/core/AGENTS/bootstrap/CLAUDE.md
Affected / Not Affected
Affected custom modes:
Not affected custom modes:
All of these are custom modes from the same Kilo Code setup.
Expected Behavior
When starting Conrad or Anna, Kilo Code should use only that selected custom mode's own instructions and identity.
For example:
Conrad should respond as Conrad
Anna should respond as Anna
The selected mode should not be replaced or overridden by unrelated external agent instructions.
Actual Behavior
When starting Conrad or Anna, the agent behaves as if instructions from C:\Users\terry\.claude\CLAUDE.md were loaded on top of or instead of the selected mode instructions.
Observed results:
- the agent identifies as a different persona defined in
CLAUDE.md
- it references loading files/instructions that belong to that external persona
- it follows the external persona workflow instead of the selected custom mode
This does not happen with our other tested custom modes.
Steps to Reproduce
- Configure multiple custom modes in Kilo Code
- Ensure
C:\Users\terry\.claude\CLAUDE.md exists
- Start a new conversation in custom mode
Conrad
- Ask a simple identity question such as:
Who are you?
- Repeat the same test with custom mode
Anna
Result
Conrad and Anna do not consistently act as themselves.
Instead, they appear to load and follow instructions from the external CLAUDE.md.
Control Test
Run the same test with other custom modes in the same setup, such as:
Those modes keep their own identity correctly and do not show the same problem.
What We Know
Confirmed:
- The issue is reproducible with
Conrad and Anna
- The issue was not observed with the other tested custom modes listed above
- The behavior strongly suggests that external
CLAUDE.md instructions are being loaded for some custom modes
Not yet confirmed:
- Why only some custom modes are affected
- What exact condition triggers this behavior
- Whether this is tied to load order, mode type, or another internal matching rule
Impact
- Some custom modes are not isolated correctly
- The selected mode can lose its identity and instructions
- This makes custom mode behavior unreliable
- It breaks trust in mode-specific workflows, because selecting a mode does not guarantee that mode will actually run as configured
Why This Seems Like a Bug
From a user perspective, selecting a custom mode should guarantee that this mode's own instructions remain authoritative.
External files such as CLAUDE.md should not silently override the selected custom mode, or there should at least be an explicit setting controlling that behavior.
Suggested Fix
Any of the following would solve the issue:
- Do not auto-load external
CLAUDE.md instructions for Kilo Code custom modes
- Add an explicit opt-in / opt-out setting for external instruction loading
- Guarantee that the selected custom mode prompt has higher priority than external agent bootstrap files
Relevant Paths
- Kilo Code config:
C:\Users\terry\.config\kilo\kilo.jsonc
- External file:
C:\Users\terry\.claude\CLAUDE.md
- Symlink target:
P:/core/AGENTS/bootstrap/CLAUDE.md
Additional Note
We are not reporting a problem with the content of those files themselves.
The issue is that some custom modes appear to load unrelated external instructions and lose their own intended identity, while other custom modes in the same environment do not.
Bug: Some custom modes load external
CLAUDE.mdinstructions and lose their mode identitySummary
We are seeing a mode-isolation problem in Kilo Code.
Two of our custom modes,
ConradandAnna, do not keep their own mode identity when started. Instead, they appear to load external instructions fromC:\Users\terry\.claude\CLAUDE.mdand then behave as a different agent/persona defined there.Other custom modes in the same setup are not affected.
Environment
C:\Users\terry\.config\kilo\kilo.jsoncC:\Users\terry\.claude\CLAUDE.mdCLAUDE.mdis a symlink to:P:/core/AGENTS/bootstrap/CLAUDE.mdAffected / Not Affected
Affected custom modes:
ConradAnnaNot affected custom modes:
ArchieWendyRandyErnieAll of these are custom modes from the same Kilo Code setup.
Expected Behavior
When starting
ConradorAnna, Kilo Code should use only that selected custom mode's own instructions and identity.For example:
Conradshould respond asConradAnnashould respond asAnnaThe selected mode should not be replaced or overridden by unrelated external agent instructions.
Actual Behavior
When starting
ConradorAnna, the agent behaves as if instructions fromC:\Users\terry\.claude\CLAUDE.mdwere loaded on top of or instead of the selected mode instructions.Observed results:
CLAUDE.mdThis does not happen with our other tested custom modes.
Steps to Reproduce
C:\Users\terry\.claude\CLAUDE.mdexistsConradWho are you?AnnaResult
ConradandAnnado not consistently act as themselves.Instead, they appear to load and follow instructions from the external
CLAUDE.md.Control Test
Run the same test with other custom modes in the same setup, such as:
ArchieWendyRandyErnieThose modes keep their own identity correctly and do not show the same problem.
What We Know
Confirmed:
ConradandAnnaCLAUDE.mdinstructions are being loaded for some custom modesNot yet confirmed:
Impact
Why This Seems Like a Bug
From a user perspective, selecting a custom mode should guarantee that this mode's own instructions remain authoritative.
External files such as
CLAUDE.mdshould not silently override the selected custom mode, or there should at least be an explicit setting controlling that behavior.Suggested Fix
Any of the following would solve the issue:
CLAUDE.mdinstructions for Kilo Code custom modesRelevant Paths
C:\Users\terry\.config\kilo\kilo.jsoncC:\Users\terry\.claude\CLAUDE.mdP:/core/AGENTS/bootstrap/CLAUDE.mdAdditional Note
We are not reporting a problem with the content of those files themselves.
The issue is that some custom modes appear to load unrelated external instructions and lose their own intended identity, while other custom modes in the same environment do not.