Skip to content

Bug: Some custom modes load external CLAUDE.md instructions and lose their mode identity #8128

@terry-webandwow

Description

@terry-webandwow

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:

  • Conrad
  • Anna

Not affected custom modes:

  • Archie
  • Wendy
  • Randy
  • Ernie

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

  1. Configure multiple custom modes in Kilo Code
  2. Ensure C:\Users\terry\.claude\CLAUDE.md exists
  3. Start a new conversation in custom mode Conrad
  4. Ask a simple identity question such as: Who are you?
  5. 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:

  • Archie
  • Wendy
  • Randy
  • Ernie

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:

  1. Do not auto-load external CLAUDE.md instructions for Kilo Code custom modes
  2. Add an explicit opt-in / opt-out setting for external instruction loading
  3. 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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions