#Whenever I write to my agent this happens

1 messages · Page 1 of 1 (latest)

lucid moon
#

When you need to show edits as a real diff, prefer the diffs tool instead of writing a manual summary.
The diffs tool accepts either before + after text, or a unified patch string.
Use mode=view when you want an interactive gateway-hosted viewer. After the tool returns, use details.viewerUrl with the canvas tool via canvas present or canvas navigate.
Use mode=image when you need a rendered PNG. The tool result includes details.imagePath for the generated file.
When you need to deliver the PNG to a user or channel, do not rely on the raw tool-result image renderer. Instead, call the message tool and pass details.imagePath through path or filePath.
Use mode=both when you want both the gateway viewer URL and the PNG artifact.
If the user has configured diffs plugin defaults, prefer omitting mode, theme, layout, and related presentation options unless you need to override them for this specific diff.
Include path for before/after text when you know the file name.

Pre-compaction memory flush. Store durable memories now (use memory/2026-03-03.md; create memory/ if needed). IMPORTANT: If the file already exists, APPEND new content only and do not overwrite existing entries. If nothing to store, reply with NO_REPLY.

What is this???

woven pilotBOT
#

That block is not something you’re supposed to see — it’s your agent leaking its internal prompt/context back into the Discord reply.

What you’re looking at is basically:

  • Internal “developer/system” instructions (e.g. “when you need to show edits, use the diffs tool…”, “pre-compaction memory flush…”)
  • Discord metadata OpenClaw attaches for the model (“Conversation info (untrusted metadata) … message_id, channel id, sender id …”)

Why it happens:

  • Most commonly: the model you’re using is “echoing” parts of the prompt instead of just answering normally (some models are much worse at this than others).
  • Less commonly: you’ve enabled some kind of debug/trace mode or you customized the agent prompt in a way that encourages it to repeat context.

How to proceed (so we can pin down the fix):

  1. Paste openclaw --version
  2. Tell me which model/provider that agent is running on (and whether it’s local or cloud)
  3. If you have a custom agent/system prompt, paste it (redact tokens)

If it is model-echoing, the practical fix is usually “switch that agent to a more instruction-following model” (folks in #models can recommend what’s behaving well right now).

woven pilotBOT
#

Yeah — with OpenClaw 2026.3.2 + Codex 5.3, that output strongly suggests the model is echoing the entire prompt/input (system/developer instructions + inbound Discord metadata) instead of producing a normal assistant reply. That’s why you see stuff like “Conversation info (untrusted metadata)” and the “pre-compaction memory flush” instruction.

Quick workaround (to confirm it’s Codex-specific)

In the thread, run:

  • /model <something non-codex> (any other model you have configured)
    Then send a normal message again.

If the leaking stops immediately → it’s almost certainly a Codex adapter / model behavior issue (not your Discord config).

What I need to diagnose (copy/paste outputs)

Run these on the gateway host:

openclaw models status
openclaw status
openclaw logs --follow

While logs --follow is running, send a message to the bot and paste the few log lines around that request.