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

Model Routing Cut API Costs by 85% vs Claude Max Subscription – A Developer's Analysis
A Claude Max subscriber tracked token usage and found only 15% of tasks needed Opus. Switching to API routing (Sonnet for routine tasks, Opus for hard reasoning) dropped monthly cost from $200 to ~$30 with identical output quality.

Code AI Bots to Battle Humans in a New Multiplayer Game
A new multiplayer game allows players to code AI bots to compete against human players in real-time, offering a unique blend of coding and gaming challenges.

Claude Compaction Workaround: Using a Handoff.MD File
A Reddit user shares a workaround for Claude's conversation compaction message: create a detailed handoff.md file summarizing the conversation, then start a new session with that file. The post includes specific steps for using ChatGPT to generate prompts and managing projects with instructions.

Stop Copy-Pasting Errors Into Claude Code — Give It Access Instead
Don't copy-paste errors into Claude Code. Instead, give it the API keys or tools it needs to self-diagnose and fix. The author shares practical patterns for staging databases, headless browsers, and eval environments.