Repository navigation
Closed
Labels
P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Description
Bug Summary
In OpenClaw WebChat, the reasoning/thinking stream from Kimi Code (kimi/kimi-for-coding, Anthropic API) and DeepSeek Reasoner (deepseek/deepseek-reasoner, OpenAI-format reasoning_content) is not rendered at all (or not streamed).
MiniMax (minimax/MiniMax-M2.7-highspeed) works correctly with the same setup.
Desired Behavior
- Reasoning should be streamed (character-by-character / chunk-by-chunk) as it arrives from the model.
- Reasoning should appear before the final answer — the WebChat UI should show the thinking process first, then transition to the visible reply, matching MiniMax’s behavior.
Actual Behavior
- Kimi Code: No reasoning UI is shown. Only the final answer appears after a long silent wait. The response definitely contains
<thinking>blocks (visible in raw Anthropic stream), but WebChat never extracts or renders them. - DeepSeek Reasoner: The
reasoning_contentfield is completely ignored. Only thecontent(final answer) is displayed, again after a silent delay. - MiniMax: Works perfectly — reasoning is mixed into the
contentstream and is rendered in real time.
Root-Cause Analysis (User-Side Investigation)
- Missing
resolveReasoningOutputModehook in the bundledkimi-codingplugin:- File:
node_modules/openclaw/dist/extensions/kimi-coding/index.js - The plugin registers
resolveThinkingProfileandwrapStreamFn, but does not defineresolveReasoningOutputMode. - MiniMax does declare
resolveReasoningOutputMode: () => "native", which allowsextractThinkingCached()to classify and extract reasoning.
- File:
- WebChat
extractThinkingCached()does not handlereasoning_contentfield for providers that return it as a separate field (DeepSeek, OpenAI-compatible). It seems to only handle MiniMax’s inline reasoning or explicitly tagged blocks. - Kimi Code Anthropic
<thinking>blocks are returned as XML in thecontentfield. The plugin lacks a replay-family hook (e.g.,buildHybridAnthropicOrOpenAIReplayPolicy) that would split<thinking>from<text>blocks, unlike MiniMax.
Steps to Reproduce
- Configure
kimi/kimi-for-coding(requiresKIMI_API_KEY,anthropic-messagesAPI,https://api.kimi.com/coding/). - Enable thinking (
defaultLevel: "low"— currently requires editingnode_modules/openclaw/dist/extensions/kimi-coding/index.jsbecause the default is"off"). - Open WebChat, send any prompt (e.g., "鸡兔同笼问题").
- Observe: no reasoning stream appears, only the final answer after ~14 s.
- Repeat with
deepseek/deepseek-reasoner— same silent result. - Switch to
minimax/MiniMax-M2.7-highspeed— reasoning streams immediately.
Environment
- OpenClaw version:
2026.5.27 (27ae826) - OS: macOS arm64
- Node: v25.x
- Kimi Code config:
{ "models.providers.kimi": { "baseUrl": "https://api.kimi.com/coding/", "api": "anthropic-messages", "apiKey": "${KIMI_API_KEY}", "models": [{ "id": "kimi-for-coding", "reasoning": true }] } } - DeepSeek config:
{ "models.providers.deepseek": { "baseUrl": "https://api.deepseek.com/v1", "api": "openai-completions", "models": [{ "id": "deepseek-reasoner", "reasoning": true }] } }
Workarounds Tried
- Thinking default hack: Changed
defaultLevelfrom"off"to"low"in compiledextensions/kimi-coding/index.jsandextensions/moonshot/index.js. This enables the upstream request, but the response is still not parsed for reasoning. - System-prompt injection: Forcing the model to emit reasoning inside the
contentfield works (visible in UI) but wastes billed tokens and context window. Not a viable production fix.
Related Issues
- Possibly related to Support reasoning-field outputs and visible final-answer handling for native reasoning models #74021, fix: preserve reasoning_content for DeepSeek models through proxy providers (opencode-native) #86521, Reasoning stream #42276 (reasoning-field / reasoning-stream handling).
Suggested Fix
- Add
resolveReasoningOutputMode: () => "native"(or appropriate mode) tokimi-codingandmoonshotprovider hooks. - Update WebChat
extractThinkingCached()(or equivalent stream pre-processor) to:- Parse OpenAI-format
reasoning_contentfield (DeepSeek). - Parse Anthropic-format
<thinking>XML blocks (Kimi Code).
- Parse OpenAI-format
- Ensure the extracted reasoning is emitted as a separate, preceding stream so it renders before the final answer content, matching MiniMax UX.
Reacted by clawsweeper
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon May 29, 2026
Codex review: this still needs some work. Reviewed October 7, 2026, 9:17 AM ET / 13:17 UTC.
Summary
Current main still lacks a WebChat consumer for live thinking events, and an open closing PR already owns the repair. The September Feishu report adds useful upstream evidence but does not establish the same defect.
Likely related people: steipete and shakkernerd, as routing candidates from recent Control UI maintenance and refactoring.
Reproducibility: yes. for the shared WebChat defect: an admitted thinking event reaches a reducer with no display consumer. This was established from source; live Kimi, DeepSeek and Feishu reproduction was not performed.
Next step
Resolve the existing linked repair through review and landing or closure before dispatching another fix PR.
Review details
Best possible solution:
Render authorized, run-scoped thinking through the existing WebChat projection and visibility controls, preserving history policy and validating any remaining provider-specific failure separately.
Do we have a high-confidence way to reproduce the issue?
Yes, for the shared WebChat defect: an admitted thinking event reaches a reducer with no display consumer. This was established from source; live Kimi, DeepSeek and Feishu reproduction was not performed.
Is this the best way to solve the issue?
Yes, the linked repair's provider-agnostic UI boundary is the narrowest supported direction; adding provider hooks alone cannot fix a browser that discards normalized thinking events.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 7a75498beb6e.
Label changes
Label changes:
No label changes.
Label justifications:
P2: Live reasoning display is broken, but final answers remain available and an existing repair owns the bounded UI defect.impact:ux-friction: Users wait without visible reasoning progress despite upstream thinking events.Evidence reviewed
What I checked:
ui/src/pages/chat/tool-stream.ts:555, 7a75498beb6e)ui/src/pages/chat/chat-state-events.ts:671, 7a75498beb6e)src/gateway/server-chat.ts:1064, 7a75498beb6e)packages/ai/src/transports/openai-completions-stream.ts:191, 7a75498beb6e)docs/tools/thinking.md. (docs/tools/thinking.md:150, 7a75498beb6e)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.xx1170822819 commentedon May 29, 2026
补充一个关键的 UX 观察:
即使实际总耗时接近(DeepSeek ~10s, MiniMax ~14s),感知速度差异巨大:
这意味着这个 bug 不只是一个"显示问题"——它直接让支持 reasoning 的模型在 WebChat 里的交互体验变得极差,用户会误以为模型"卡住了"或"响应很慢",而切换到 MiniMax 后体验天差地别。
强烈建议提升优先级,因为随着越来越多的模型支持 reasoning(Kimi K2.5, DeepSeek R1, Kimi Code 等),这个 UX regression 的影响面会越来越大。
xx1170822819 commentedon May 29, 2026
更正/补充:
我之前的"感知速度"分析有误。经过在 OpenClaw 终端(非 WebChat) 的实际对比测试,发现:
所以 WebChat 的问题(reasoning 不渲染)和模型本身的推理速度是两个独立的问题:
如果 maintainer 需要,我可以提供同一道题(鸡兔同笼)在终端下三个模型的完整耗时日志对比。
openclaw-barnacle commentedon Jun 15, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
39 remaining items
tiangle commentedon Sep 2, 2026
Adding channel-side confirmation of the same root cause, with deeper evidence that this is not UI-only (WebChat) but happens at the streaming-parse layer.
Environment
2026.8.2, Node22.23.2, Linux x64@openclaw/[email protected]deepseek/deepseek-v4-pro(V4, notdeepseek-reasoner)agents.defaults.reasoningDefault: "stream", modelcompat.thinkingFormat: "deepseek"Key evidence — the reasoning text never reaches the channel plugin
I added temporary logging in the Feishu reply dispatcher.
onReasoningEndfires, butonReasoningStreamis never called:So the reasoning start/end lifecycle signals are emitted, but no
thinking_deltastream event (with text) is produced. This is upstream of WebChat'sextractThinkingCached()— the channel-levelonReasoningStreamcallback receives nothing.Supporting facts
https://api.deepseek.com/chat/completions(stream:true) returnsdelta.reasoning_content(~55 chars for a trivial prompt).openclaw agent --jsonreportsreasoningTokens: 28— usage stats are counted correctly.transcript_eventsdoes contain athinkingblock with the full reasoning text — it is recorded post-hoc, not streamed live.Note on
thinkingFormatSetting
models.providers.deepseek.models[].compat.thinkingFormat: "deepseek"fixedreasoningTokens(0 → 28) and transcript recording, but did not restore livethinking_deltastreaming. So the request-side DeepSeek wrapper handles replay/usage, while the response-sidereasoning_content→thinking_deltamapping is what appears to be missing.Hope this helps narrow it down — the fix likely belongs in the openai-completions stream parser (mapping
delta.reasoning_contentto athinking_deltaevent), which would cover both WebChat and channel streaming.Boris-c commentedon Oct 8, 2026
Still reproducible on 2026.9.8, and the current
latest(2026.9.9) and2026.10.1-beta.2packages show the same gap. Adding a local-model data point:Setup
api: "openai-completions", Qwen3.5-9B model withreasoning: truereasoningDefault: "stream",thinkingDefault: "adaptive";agents.defaults.blockStreamingDefault: "on",blockStreamingBreak: "text_end"ui.prefs.chatShowThinking: trueObserved: reasoning only appears after the full reply is finished (from the stored transcript), never live.
What I checked, layer by layer
delta.reasoning_contenttoken by token (verified with a rawcurlSSE request).@openclaw/aiopenai-completions-streamturns those intothinking_start/thinking_deltaevents.emitReasoningStream→emitAgentEvent({ stream: "thinking", data: { text, delta } }).server-chatforwardsagentevents withstream === "thinking"to Control UI clients (coalesced viaresolveAgentTextThrottleStream).run_status,assistant,compaction,lifecycleandfallback. I found no consumer ofstream === "thinking"in anydist/control-ui/assets/*.jsfor 2026.9.8, 2026.9.9 or 2026.10.1-beta.2.So for this route, the backend appears to deliver live thinking and the WebChat client drops it. That matches #117721 ("render live thinking agent events in WebChat"), which is still open. Is anything blocking it?