Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When using the moonshot/kimi-k2.6 model via the OpenClaw web gateway, internal reasoning text from the model is not filtered or separated. It is directly concatenated with the formal response and displayed to end users, resulting in visible internal monologue, self-questioning and step-by-step thinking mixed into the final answer.
Additionally, the frontend status label shows Reasoning: off, but reasoning content is still output. The frontend display is not synchronized with the actual parameters sent to the Moonshot API.
Steps to reproduce
Add and configure moonshot/kimi-k2.6 with default settings in OpenClaw.
Open the web gateway chat interface.
Send any question that requires reasoning (e.g. a logic or analysis question).
Observe the streaming output and the final rendered message.
Expected behavior
The reasoning_content field from the Moonshot API response should be hidden from users. Only the formal content field should be rendered in the chat.
When the frontend shows Reasoning: off, the parameter thinking: {"type": "disabled"} should actually be passed to the Moonshot API, and no reasoning content should be generated at all.
Actual behavior
Both reasoning content and formal answer are concatenated together and shown as a single message, with visible internal thought process (self-correction, repeated confirmation, verbose analysis) mixed into the reply.
The frontend label indicates reasoning is disabled, but reasoning content still appears in the output.
OpenClaw version
2026.6.10
Operating system
Window11
Install method
No response
Model
moonshot/kimi-k2.6
Provider / routing chain
gateway
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
According to the official Moonshot Kimi K2.6 API documentation, reasoning content is returned in the separate reasoning_content field, and the formal response is in the content field. The two fields are completely separated in the raw API response, so this issue is caused by missing field-filtering logic on the gateway side.
Temporary workaround: Manually add "thinking": {"type": "disabled"} to the model params in the config file to disable reasoning entirely at the model level.
Screenshot of the abnormal output is attached below.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 25, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 25, 2026, 6:02 AM ET / 10:02 UTC.
Summary
Keep open: current main and the latest release already send Moonshot
thinking: { type: "disabled" }when thinking is off and route structuredreasoning_contentinto hidden thinking blocks, but the reporter's screenshot shows a current-release user-visible monologue and we do not yet have the raw Moonshot stream needed to prove whether this is a parser leak or Kimi emitting reasoning-like prose as normalcontent.Reproducibility: unclear. The reporter provides concrete steps and a screenshot from v2026.6.10, but current source and tests already cover the structured
reasoning_contentpath, so a raw Moonshot stream capture is needed to reproduce the actual current-main failure mode.Ways to help us reproduce this
Next step
This should not queue an automated fix until a maintainer or live test captures the raw Moonshot K2.6 stream with thinking disabled and decides whether provider-level inline-content sanitizing is acceptable.
Security
Needs attention: The issue is security-sensitive because, if confirmed, hidden reasoning or internal model self-analysis is exposed to end users.
Review details
Best possible solution:
Capture a live or fixture-backed Moonshot K2.6 stream with thinking disabled, then fix only the proven boundary: parser/request handling if
reasoning_contentleaks, or a narrow provider-owned sanitizer only if Kimi emits a confirmed inline reasoning delimiter ascontent.Do we have a high-confidence way to reproduce the issue?
Unclear. The reporter provides concrete steps and a screenshot from v2026.6.10, but current source and tests already cover the structured
reasoning_contentpath, so a raw Moonshot stream capture is needed to reproduce the actual current-main failure mode.Is this the best way to solve the issue?
Unclear. The requested gateway-side field filtering is already present for structured
reasoning_content; the safer solution is raw-stream proof first, then a provider/parser fix rather than a broad semantic text stripper.AGENTS.md: found and applied where relevant.
Remaining risk / open question:
thinking: { type: "disabled" }was available, so the exact field shape remains unverified.reasoning_contentor ordinarycontent; a broad text stripper could remove legitimate answers.Codex review notes: model internal, reasoning high; reviewed against 4ecb45bf7729.
Label changes
Label changes:
P1: A current-release report of internal reasoning being shown to WebChat users is urgent because it affects user-visible provider/gateway behavior even though raw-stream proof is still needed.impact:security: The issue is about internal reasoning or model self-analysis being exposed in user-visible chat output.impact:auth-provider: The failure depends on Moonshot/Kimi provider parameters, reasoning_content handling, and model routing behavior.issue-rating: 🦐 gold shrimp: Current issue advisory state selects this label.clawsweeper:needs-info: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.clawsweeper:needs-product-decision: Current issue advisory state selects this label.clawsweeper:needs-security-review: Current issue advisory state selects this label.Label justifications:
P1: A current-release report of internal reasoning being shown to WebChat users is urgent because it affects user-visible provider/gateway behavior even though raw-stream proof is still needed.impact:security: The issue is about internal reasoning or model self-analysis being exposed in user-visible chat output.impact:auth-provider: The failure depends on Moonshot/Kimi provider parameters, reasoning_content handling, and model routing behavior.Evidence reviewed
Security concerns:
The screenshot and report indicate reasoning-like internal monologue can appear in WebChat despite reasoning being off; raw stream proof is needed to identify whether this is a structured-field leak or normal content from the provider.
Confidence: 0.72
Acceptance criteria:
thinking: { type: "disabled" }and raw streamed chunks showingreasoning_contentversuscontent.src/agents/openai-transport-stream.test.tsand the relevant Moonshot wrapper tests.src/gateway/server-methods/chat.directive-tags.test.tsorui/src/ui/chat/message-extract.test.ts.What I checked:
AGENTS.md:1, 4ecb45bf7729)VISION.md:22, 4ecb45bf7729)thinking.type = "disabled", and emits reasoning viareasoning_contentat the same level ascontentin streaming responses. (platform.moonshot.ai)offto Moonshotdisabled, so the UI status is backed by a provider request path when the session thinking level is actually off. (src/llm/providers/stream-wrappers/moonshot-thinking.ts:135, 4ecb45bf7729)reasoning_content,reasoning, andreasoning_textfrom OpenAI-compatible deltas and emits them askind: "thinking", not normal visible text. (src/agents/openai-transport-stream.ts:3557, 4ecb45bf7729)Likely related people:
src/llm/providers/stream-wrappers/moonshot-thinking.ts,src/agents/openai-transport-stream.ts,src/agents/sessions/sdk.ts)reasoning_contentassistant tool-call replay backfill PR, which is adjacent to Kimi reasoning_content preservation and request behavior. (role: prior Moonshot reasoning replay contributor; confidence: medium; commits: 0063f3076c17; files:src/llm/providers/stream-wrappers/moonshot-thinking.ts,src/agents/embedded-agent-runner-extraparams-moonshot.test.ts,extensions/moonshot/moonshot.live.test.ts)thinking.keepsupport, directly adjacent to the reported model and setting. (role: prior Moonshot K2.6 contributor; confidence: medium; commits: c8e5150fd49f; files:docs/providers/moonshot.md,src/agents/pi-embedded-runner/moonshot-thinking-stream-wrappers.ts,src/plugin-sdk/provider-stream.ts)src/agents/pi-embedded-runner/moonshot-stream-wrappers.ts,src/agents/pi-embedded-runner/extra-params.ts)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.BaichouRiver commentedon Jun 25, 2026
openclaw-barnacle commentedon Jul 10, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
clawsweeper commentedon Jul 10, 2026
ClawSweeper status: review started.
I am starting a fresh review of this issue: [Bug]: reasoning_content leaks into chat output with moonshot/kimi-k2.6, frontend reasoning status out of sync This is item 1/1 in the current shard. Shard 17/32.
This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.
Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.
openclaw-barnacle commentedon Jul 18, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.