How I Proved My Own Bug Report Wrong: OpenClaw Telegram Debugging via apiRoot Proxy
OpenClaw's Telegram apiRoot config per account can be pointed at a local proxy to capture the actual wire payloads, letting you distinguish between real reinsertion bugs and client-side rendering artifacts. One developer used this to prove his own bug report wrong — and retract it.
The bug report saga
Last week, a main agent started refusing instructions, claiming messages contained an injected system block. The user filed issue #137927. It turned out OpenClaw's internal runtime context was leaking into visible message text, reading like an injection. The issue was closed after three fixes were merged, but the maintainers noted the fixes did not resolve the "complete block reinserted into clean text" symptom the user reported. Six sibling issues remained open.
Why the evidence was weak
When the user retested by stripping HTML and copying the clean text, the delimiters reappeared. A commenter pointed out that this could be four different things: model echoing, replay contamination, client rendering, or actual channel reinsertion. The user's evidence — text pasted from a chat client — could not distinguish these. Nobody in eleven threads had captured the actual transmitted payload.
Capturing the wire payload
OpenClaw's Telegram config has a per-account apiRoot. Pointing it at a local logging proxy causes that account's API calls to go through the proxy instead of Telegram. Steps:
- Create a throwaway bot from BotFather.
- Add it as a second Telegram account in config, bound to the same agent.
- Set only that account's
apiRootto a local logging proxy. - Proxy logs the request body, forwards to api.telegram.org, returns the response.
- Production accounts keep real tokens and default
apiRoot— nothing else routes through it.
About 120 lines of stdlib Python suffice for the proxy.
The results
Test one: Plain prose with no delimiters. Wire payload was completely clean. But the agent's reply mentioned that its input had arrived with the full runtime context block appended — so the block reaches the model even when outbound is clean.
Test two: The user sent the stripped preamble text. The wire payload showed <<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>> (HTML-escaped), but what copied out was the literal <<<BEGIN\_OPENCLAW\_INTERNAL\_CONTEXT>>>. The literal delimiter was never transmitted — the agent quoted it while describing the block, OpenClaw HTML-escaped it (parse_mode is HTML), Telegram rendered it back to the literal string, and copying gave the unescaped version.
The takeaway
Any transcript pasted into a bug report has already gone through render and copy — it cannot prove transmission vs quoting. Several reports rest on such weak evidence. This debugging method proves more reliable. Also, while reading the fixes, the user found something worse — a separate architectural issue — which they plan to report separately.
📖 Read the full source: r/openclaw
👀 See Also

OpenClaw v2026.3.13 adds per-agent cacheRetention config for OpenAI token cost savings
OpenClaw v2026.3.13 adds per-agent cacheRetention configuration that enables OpenAI's 24-hour prompt cache retention, potentially cutting input token costs by up to 90% for agents with heartbeat cycles longer than 10 minutes.

After 3 months of A/B testing 160 Claude prompt codes: the boring takeaways
Samarth built a controlled test rig, ran 160 prompt codes through it, and found that most are placebo, 7 consistently shift reasoning, and stacking 3+ codes confuses the model. Skills files outperform prompt codes for Claude Code.

The Prompt Structure That Fixed Claude AI Summaries of Large PDF Reports
A developer shares how switching from 'summarize this' to role + decision + specific extraction prompts turned Claude's generic summary output into actionable risk flags and concrete action items.

Workflow Memory Over Tooling: Why Context Loading Beats Giant Prompts
Instead of piling instructions into prompts, load workflow-specific checklists on demand — release checklist, hotfix rules, migration steps — and drop them when done.