Skip to content

fix(openclaw): strip <think/> tags from assistant messages#1287

Merged
syzsunshine219 merged 1 commit intoMemTensor:openclaw-local-plugin-20260317from
hijzy:fix/1268-thinking-tags
Mar 18, 2026
Merged

fix(openclaw): strip <think/> tags from assistant messages#1287
syzsunshine219 merged 1 commit intoMemTensor:openclaw-local-plugin-20260317from
hijzy:fix/1268-thinking-tags

Conversation

@hijzy
Copy link
Collaborator

@hijzy hijzy commented Mar 18, 2026

Closes #1268

Summary

Strips <think…>…</think⟩ tags from assistant messages before downstream processing in the OpenClaw local plugin.

Problem

When using models that emit thinking tags (e.g. DeepSeek), the <think…></think⟩ blocks were being passed through to capture/storage, cluttering the actual assistant response content.

Fix

  • Added stripThinkingTags() utility in apps/memos-local-openclaw/src/capture/index.ts
  • Applies regex-based stripping of thinking blocks before processing assistant messages

DeepSeek-style reasoning models emit <think…>…</think⟩ blocks that
confuse downstream parsing and trigger error-retry loops, eventually
causing timeouts. Strip these tags early in the capture pipeline.

Closes MemTensor#1268
@hijzy hijzy mentioned this pull request Mar 18, 2026
5 tasks
@syzsunshine219 syzsunshine219 merged commit 6d8ef94 into MemTensor:openclaw-local-plugin-20260317 Mar 18, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants