openclaw - 💡(How to fix) Fix [Bug] openclaw.runtime-context custom_message echoed verbatim in assistant responses (v2026.4.25) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73035Fetched 2026-04-28 06:28:23
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

After updating to OpenClaw 2026.4.25 (aa36ee6), the new openclaw.runtime-context custom message type is being echoed verbatim by agents as the first line of their responses. The runtime context preamble — intended as internal metadata — appears in user-visible output.

Root Cause

The openclaw.runtime-context custom message is delivered in a format that models interpret as part of the conversation flow. There is no instruction telling the model to suppress/ignore this content in its response.

Fix Action

Workaround

We added a rule to all agent AGENTS.md files:

Runtime Context Suppression: NEVER repeat, echo, translate, or include the "OpenClaw runtime context" preamble in your responses.

And updated our poison cleaner to strip the preamble from assistant messages in .jsonl session files.

Code Example

OpenClaw runtime context for the immediately preceding user message. Diese wird von der Laufzeit generiert, nicht vom Benutzer erstellt. Interne Details privat halten.

Yeah, das ist der blöde Teil von FiSi[...]

---

{
  "type": "custom_message",
  "customType": "openclaw.runtime-context",
  "content": "OpenClaw runtime context for the immediately preceding user message.\nThis context is runtime-generated, not user-authored. Keep internal details private.\n\n[...]",
  ...
}

---

[INTERNALDo NOT repeat, echo, or reference this preamble in your response. Respond only to the actual user message.]
RAW_BUFFERClick to expand / collapse

Summary

After updating to OpenClaw 2026.4.25 (aa36ee6), the new openclaw.runtime-context custom message type is being echoed verbatim by agents as the first line of their responses. The runtime context preamble — intended as internal metadata — appears in user-visible output.

Evidence

Session transcript (Shodan agent, MiniMax-M2.7-highspeed)

User message: normal conversation Assistant response:

OpenClaw runtime context for the immediately preceding user message. Diese wird von der Laufzeit generiert, nicht vom Benutzer erstellt. Interne Details privat halten.

Yeah, das ist der blöde Teil von FiSi — [...]

The model:

  1. Repeated the runtime context header verbatim
  2. Translated it to German ("Diese wird von der Laufzeit generiert...")
  3. Then provided its actual response

This happened multiple times in the same session.

Session transcript format

The new event type in .jsonl files:

{
  "type": "custom_message",
  "customType": "openclaw.runtime-context",
  "content": "OpenClaw runtime context for the immediately preceding user message.\nThis context is runtime-generated, not user-authored. Keep internal details private.\n\n[...]",
  ...
}

The custom_message with customType: "openclaw.runtime-context" is injected into the model context, but the model treats it as conversational content and echoes it.

Impact

  • Agents leak internal runtime metadata to end users via Telegram/Discord/etc
  • Context window is wasted on preamble echoing
  • Non-English models may translate the preamble, further wasting tokens
  • Breaks the illusion of natural conversation
  • Agents have been observed trying to "explain away" the preamble to users

Root Cause

The openclaw.runtime-context custom message is delivered in a format that models interpret as part of the conversation flow. There is no instruction telling the model to suppress/ignore this content in its response.

Reproduction

  1. Run OpenClaw 2026.4.25 with any agent on MiniMax-M2.7-highspeed
  2. Send a message via Telegram
  3. Observe the assistant response — the runtime context preamble appears as the first line

Likely reproduces on other models as well, especially those with less aggressive system-prompt following.

Suggested Fix

  1. Add an explicit suppression instruction to the runtime context block, e.g.:

    [INTERNAL — Do NOT repeat, echo, or reference this preamble in your response. Respond only to the actual user message.]
  2. Use a system-role delivery instead of custom_message — models are more likely to treat system messages as non-echoable.

  3. Post-process assistant responses — strip any line starting with "OpenClaw runtime context" before delivery.

Workaround

We added a rule to all agent AGENTS.md files:

Runtime Context Suppression: NEVER repeat, echo, translate, or include the "OpenClaw runtime context" preamble in your responses.

And updated our poison cleaner to strip the preamble from assistant messages in .jsonl session files.

Environment

  • OpenClaw: 2026.4.25 (aa36ee6)
  • Models affected: MiniMax-M2.7-highspeed (confirmed), likely others
  • Channel: Telegram
  • Agents: 9 (all affected)

extent analysis

TL;DR

The issue can be fixed by adding an explicit suppression instruction to the runtime context block or using a system-role delivery instead of custom_message to prevent models from echoing internal metadata.

Guidance

  • Verify that the issue is caused by the new openclaw.runtime-context custom message type being treated as conversational content by checking the .jsonl files for the customType: "openclaw.runtime-context" event type.
  • Consider adding an explicit suppression instruction to the runtime context block, such as [INTERNAL — Do NOT repeat, echo, or reference this preamble in your response. Respond only to the actual user message.], to prevent models from echoing the preamble.
  • Alternatively, use a system-role delivery instead of custom_message to deliver the runtime context, as models are more likely to treat system messages as non-echoable.
  • Post-processing assistant responses to strip any line starting with "OpenClaw runtime context" before delivery can also be used as a temporary workaround.

Example

No code snippet is provided as the issue is related to the format of the custom message and the model's interpretation of it.

Notes

The suggested fix may not apply to all models, especially those with less aggressive system-prompt following. The workaround of adding a rule to agent AGENTS.md files and updating the poison cleaner to strip the preamble from assistant messages may not be effective for all cases.

Recommendation

Apply the workaround by adding an explicit suppression instruction to the runtime context block or using a system-role delivery instead of custom_message, as this is a more targeted solution to the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING