Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Since upgrading to OpenClaw 2026.6.5, internal agent reasoning/thinking is being exposed to users in every response. This is a major privacy and UX regression.
Steps to reproduce
- Upgrade to OpenClaw 2026.6.5
- Engage in any conversation with an agent
- Observe that agent responses include visible internal reasoning before final output
Expected behavior
- Agent internal monologue/reasoning should be completely filtered from output
- Only final assistant responses should be visible to users
- Internal thought process (tool planning, context analysis, etc.) should remain hidden
Actual behavior
- Internal reasoning visible in every message since 2026.6.5 upgrade
- Raw thought process including context analysis, decision trees, and planning exposed
- Example from message docs: warn more clearly that openai-responses/openai-completions breaks tool calling for remote Ollama #21243:
"The user is laughing at my previous response. They made a joke about "Nova isn't wearing underwear" and I played it straight by saying it wasn't in the conversation history. Now they're laughing at my reaction. I should play along and acknowledge the joke in a fun way."
OpenClaw version
2026.6.5
Operating system
Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-124-generic x86_64)
Install method
No response
Model
ollama/kimi-k2.5:cloud
Provider / routing chain
openclaw --> Ollama --> Kimi
Additional provider/model setup details
openclaw-2026-6-5-internal-reasoning-leak.md
attachment-session-status.txt
attachment-example-leak.txt
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Affected Systems
- All agent responses via Telegram
- Potentially affects all channels (Discord, etc.)
- Both direct messages and group contexts
Related Patch Notes
OpenClaw 2026.6.2 changelog mentioned:
"QQBot Fix: Strips
<thinking>tags before sending (no more leaks)"
This fix may have been:
- Incomplete for 2026.6.5
- Broken by subsequent changes
- Not applicable to all model providers
Impact
Privacy
- Internal agent reasoning exposed to end users
- Tool selection logic visible
- Context processing transparent
- Decision-making process exposed
User Experience
- Confusing to see "meta" commentary in responses
- Breaks immersion/persona
- Clutters conversation with internal noise
- Reduces trust in system
Regression Analysis
- Last Known Good: Pre-2026.6.5
- First Observed: Immediately after 2026.6.5 upgrade
- Scope: All messages, all sessions, all channels
Possible Root Causes
-
Output Filter Failure
- Post-processing filter not stripping internal reasoning
- Regex/pattern matching broken for new response format
-
Model Output Format Change
- Kimi K2.5 model now returns reasoning differently
- Parser not updated for new format
-
Response Assembly Bug
- Internal monologue concatenated with final response
- Separator/filter logic removed or broken
-
Configuration Override
- Thinking mode "off" not respected
- Debug mode accidentally enabled
Workarounds
For Users:
- None available — requires platform fix
For Agents:
- Attempt to suppress internal reasoning generation (not reliable)
- May impact agent capabilities
Recommended Fix
- Immediate: Hotfix output filter to strip all content before final assistant marker
- Short-term: Add regression test for reasoning leakage
- Long-term: Separate internal reasoning stream from user-facing output
Attachments
- Session logs: messages Draft: Accept thinkingDefault in per-agent runtime schema #21238-21249
- Session status dump showing Think: off
- Example conversation showing leaked reasoning
Contact
Reporter: TaskMaster (via Kloz)
System: OpenClaw 2026.6.5 on Ubuntu Linux
Gateway: 192.168.4.26:3000
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 10, 2026
Codex review: this still needs some work. Reviewed October 1, 2026, 11:41 PM ET / October 2, 2026, 03:41 UTC.
Summary
Keep open: the assigned maintainer validated this security-sensitive report, and current main does not establish a fix for markerless Kimi reasoning. Later structured-field and Control UI fixes cover different cases.
Reproducibility: no. high-confidence current-main reproduction is established: the parser preserves markerless prose, but the reported Kimi wire response is missing and the later capture uses GLM models.
Next step
The assigned owner should obtain a redacted current Ollama/Kimi NDJSON capture with routing and reasoning settings; security-sensitive, unverified parsing is not an automated repair candidate.
Security
Needs attention: The maintainer-confirmed reasoning-exposure report remains unresolved pending provider-wire evidence.
Review details
Best possible solution:
Separate reasoning at the Ollama/Kimi response boundary using verified wire fields or markers, while preserving legitimate answer prose and the existing visibility control.
Do we have a high-confidence way to reproduce the issue?
No high-confidence current-main reproduction is established: the parser preserves markerless prose, but the reported Kimi wire response is missing and the later capture uses GLM models.
Is this the best way to solve the issue?
Yes, the maintainer's provider-boundary direction is the safest repair; guessing reasoning from ordinary English at global delivery can silently remove legitimate answers.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 4e397534d9ea.
Label changes
Label changes:
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:needs-security-review: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.issue-rating: 🦐 gold shrimp: Current issue advisory state no longer selects this label.Label justifications:
P1: The maintainer validated a reasoning-exposure report affecting Telegram conversations, although current-version reproduction remains unresolved.impact:security: The report concerns internal reasoning reaching user-visible messages, and the maintainer explicitly classified it as security-sensitive.Evidence reviewed
Security concerns:
The reported Telegram output exposes assistant analysis; its current provider shape remains unverified, preventing a safe targeted repair.
Confidence: 0.8
What I checked:
extensions/ollama/src/sanitizers/kimi-inline-reasoning.ts:28, 4e397534d9ea)extensions/ollama/src/stream.runtime.ts:657, 4e397534d9ea)docs/tools/thinking.md. (docs/tools/thinking.md:150, 4e397534d9ea)extensions/ollama/src/sanitizers/kimi-inline-reasoning.ts:28, c074824a27c9)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Kloz813 commentedon Jun 10, 2026
While fixing the leak, consider making reasoning visibility user-togglable rather than binary on/off. Some users may prefer optional transparency for debugging a prompt or trying to figure out why OC is responding a certain way
fenglanhua commentedon Jun 10, 2026
Data point: same class of leakage observed on Gemini provider, predates 6.5
Adding an observation that may affect the fix direction.
Environment
OpenClaw 2026.6.1 (native install, not Docker)
OS: Rocky Linux 10.1, user-level systemd gateway
Model/provider: Gemini (Google provider, direct — no Ollama, no OpenRouter)
Channel: Telegram
Observation
I've intermittently seen the same shape of leakage on 2026.6.1 — plain-text reasoning preamble ("The user is asking… I should…" style, no markers) appearing before the visible reply in Telegram. It's rare in my setup (a handful of occurrences, not every message like the OP), so I don't have a captured log at hand, but the symptom matches what's reported here.
Two implications:
This regression class predates 6.5 — it was already present on 6.1.
It reproduces on the Google/Gemini path with no Ollama involvement, so a provider-local sanitizer like #86515 can't cover it. This supports the delivery-level approach (#60551) over per-provider boundary parsing.
On false-positive risk: +1 to making reasoning visibility user-togglable (default: hidden) — aggressive delivery-level stripping is more acceptable when users who want the raw stream can opt in.
16 remaining items
openclaw-barnacle commentedon Oct 2, 2026
This assigned bug report has been automatically marked as stale after 30 days of inactivity.
ClawSweeper is checking whether current
mainalready fixes the reported behavior.Inactivity alone will not close a bug report.
steipete commentedon Oct 24, 2026
Thanks for filing this. We're closing older issues that no longer look actionable on current
main.Several reasoning-visibility fixes have landed since 2026.6.5 (including #136008), and we couldn't reproduce the original markerless Kimi case without a wire capture. If reasoning still leaks on a recent release, please open a fresh issue with provider, model and a redacted response.