Skip to content

[Bug]: Internal Reasoning Leakage in 2026.6.5 #91804

Closed as not planned
Closed as not planned

Description

@Kloz813

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

  1. Upgrade to OpenClaw 2026.6.5
  2. Engage in any conversation with an agent
  3. 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

  1. Output Filter Failure

    • Post-processing filter not stripping internal reasoning
    • Regex/pattern matching broken for new response format
  2. Model Output Format Change

    • Kimi K2.5 model now returns reasoning differently
    • Parser not updated for new format
  3. Response Assembly Bug

    • Internal monologue concatenated with final response
    • Separator/filter logic removed or broken
  4. 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

  1. Immediate: Hotfix output filter to strip all content before final assistant marker
  2. Short-term: Add regression test for reasoning leakage
  3. Long-term: Separate internal reasoning stream from user-facing output

Attachments

Contact

Reporter: TaskMaster (via Kloz)
System: OpenClaw 2026.6.5 on Ubuntu Linux
Gateway: 192.168.4.26:3000

Activity

  1. clawsweeper commented on Jun 10, 2026

    @clawsweeper
    Contributor

    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:

    • A current redacted Kimi response has not established whether the exposed prose arrives in message.content, a separate reasoning field, or a stable marked format.

    Codex review notes: model internal, reasoning medium; reviewed against 4e397534d9ea.

    Label changes

    Label changes:

    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:needs-security-review: Current issue advisory state selects this label.
    • remove clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.
    • remove 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:

    • [medium] Internal reasoning reaches visible replies
      The reported Telegram output exposes assistant analysis; its current provider shape remains unverified, preventing a safe targeted repair.
      Confidence: 0.8

    What I checked:

    Likely related people:

    • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • jason-allen-oneal: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.
    on Jun 10, 2026
  3. Kloz813 commented on Jun 10, 2026

    @Kloz813
    Author

    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

  4. fenglanhua commented on Jun 10, 2026

    @fenglanhua

    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.

  5. self-assigned this
    on Jun 10, 2026
  6. 16 remaining items

  7. added
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    and removed
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    on Sep 1, 2026
  8. openclaw-barnacle commented on Oct 2, 2026

    @openclaw-barnacle

    This assigned bug report has been automatically marked as stale after 30 days of inactivity.
    ClawSweeper is checking whether current main already fixes the reported behavior.
    Inactivity alone will not close a bug report.

  9. added
    clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    on Oct 2, 2026
  10. steipete commented on Oct 24, 2026

    @steipete
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions