#Bootstrap Ritual not initiating / Agent ignoring identity & leaking thoughts

1 messages · Page 1 of 1 (latest)

steady marlin
#

I am experiencing an issue where the Bootstrap Ritual does not seem to be properly injected or followed by the agent. Despite having bootstrap files present, the model fails to adopt the configured identity and instead leaks internal reasoning tags (<|thought|>) or gets stuck in repetitive token loops (e.g., "323232..."). Occasionally, the agent responds with "No further note from me" or hallucinates its identity (e.g., calling itself "OpenClaude").
System Info:

  • OpenClaw Version: 2026.4.26
  • OS: Windows 11 / WSL2 (Ubuntu)
  • Hardware: RTX 4090 (24GB VRAM), MEG Z790 ACE, 64GB RAM.
  • Models tested: ollama/supergemma:latest (26B), ollama/gemma4:latest.
    Current Configuration:
  • Bootstrap files are located in ~/.openclaw/agents/main/boot_files/ (including identity.md and vibe.md).
  • openclaw status reports: 1 bootstrap file present, but the agent ignores the instructions during the session.
  • Gateway is reachable and Telegram is configured correctly.
    Observed Behavior:
  1. Thought Leakage: The model outputs raw <|channel|>thought tags and JSON blocks instead of clean text.
  2. Identity Confusion: Ignoring the persona defined in the bootstrap files.
  3. Token Loops: Entering infinite repetition cycles under certain prompts.
    Steps Taken:
  • Ran openclaw doctor --fix (no critical errors found).
  • Manually purged sessions using rm -rf ~/.openclaw/agents/main/sessions/*.
  • Set supportsTools: false and reasoning: false in openclaw.json, but the leakage persists with uncensored models.
    Question:
    Is there a specific Prompt Template or Stop Sequence I should be using for Gemma-based uncensored models to ensure the Bootstrap Ritual is prioritized and internal thoughts are stripped?
lost lanceBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

limpid magnetBOT
#

Short version: don’t start with stop sequences. This looks like two issues:

  1. Bootstrap path/name mismatch. OpenClaw injects bootstrap files from the active workspace, usually ~/.openclaw/workspace, with exact names like AGENTS.md, SOUL.md, IDENTITY.md, USER.md, etc. ~/.openclaw/agents/main/boot_files/identity.md / vibe.md are not the standard injected files, so the persona may not be reaching the model. Use /context list or /context detail to confirm what’s actually injected. (docs.openclaw.ai)

  2. Model/template instability. For Ollama, make sure you’re using the native Ollama endpoint, not /v1:

models: {
  providers: {
    ollama: {
      apiKey: "ollama-local",
      baseUrl: "http://127.0.0.1:11434",
      api: "ollama",
    },
  },
}

The docs specifically warn that /v1 OpenAI-compatible mode can cause raw tool JSON / bad tool behavior; native /api/chat is the intended path. (docs.openclaw.ai)

#

For local Gemma/uncensored models, I’d try this order:

{
  agents: {
    defaults: {
      experimental: {
        localModelLean: true,
      },
      model: { primary: "ollama/gemma4:latest" },
    },
  },
}

Then, if still leaking/looping, define the model explicitly and mark it non-reasoning / non-tool-capable under the model entry, not as a random top-level key.

#

The blunt answer: there isn’t a magic OpenClaw stop sequence that will make an unstable uncensored Gemma reliably follow the Bootstrap Ritual. Stop sequences can hide some leaked tags, but identity confusion + 323232... loops usually mean the model/checkpoint/template can’t handle the full agent prompt. localModelLean, correct workspace files, native Ollama API, and a stronger instruct model are the real fixes.

steady marlin
#

i’ve got a new headache.

every model i load is leaking internal openclaw code into the chat. i say "hello" and it starts yapping about sessions_history and get_openclaw_runtime_context implementation details.

already tried setting injectSystemDocs to false and doing a fresh /new but the leak is still there. feels like the system is dumping its own source code into the context and the model is prioritizing it over my prompt.

anyone know how to kill this "dev-mode" leak?

limpid magnetBOT
#

That sounds like the local model is echoing OpenClaw’s system/tool context, not necessarily “dev mode.”

OpenClaw always injects core sections like Tooling, Runtime, Documentation, and workspace bootstrap files; /context detail is the first thing I’d check because it shows where the tokens are coming from. (docs.openclaw.ai)

Try this isolation path:

{
  tools: {
    profile: "minimal",
  },
  agents: {
    defaults: {
      experimental: {
        localModelLean: true,
      },
#
    },
  },
}

Then start a fresh session. localModelLean is specifically meant for local backends that choke on the full OpenClaw tool surface. (docs.openclaw.ai)

Also verify Ollama is using native Ollama mode, not /v1:

models: {
  providers: {
    ollama: {
      baseUrl: "http://127.0.0.1:11434",
      api: "ollama",
#
      apiKey: "ollama-local",
    },
  },
}

If it still leaks, run:

openclaw config get agents.defaults.workspace

Then search that workspace for the leaked terms:

#
grep -R "get_openclaw_runtime_context\|sessions_history" ~/.openclaw/workspace ~/.openclaw/agents/main -n

If those strings show up in AGENTS.md, MEMORY.md, TOOLS.md, etc., the model is probably reading them from injected workspace context. If they don’t show up and /context detail shows only tool schemas/runtime sections, then it’s model/template weakness — use a stronger model or keep tools disabled for that model.