openclaw - 💡(How to fix) Fix Gemini thought-block leak with "...94>thought CRITICAL INSTRUCTION" format [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#61350Fetched 2026-04-08 02:59:37
View on GitHub
Comments
3
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
commented ×3cross-referenced ×1
RAW_BUFFERClick to expand / collapse

The regex filter catches standard <thinking> and <thought> tags but misses this variant seen multiple times in the April 4 Gemini 3.1 session:

'...94>thought CRITICAL INSTRUCTION 1:...'

It leaks into Telegram even on 'silent' responses. Reproducible in heartbeat/silent paths.

Steps to reproduce: Run a Gemini 3.1 session with heartbeat-style silent output.

This matches the pattern fixed in previous thought-leak issues.

extent analysis

TL;DR

Update the regex filter to match the variant '...94>thought' pattern to prevent thought leaks in silent responses.

Guidance

  • Review the existing regex filter to identify why it misses the '...94>thought' variant and adjust the pattern to include this case.
  • Verify the updated filter by running a Gemini 3.1 session with heartbeat-style silent output and checking for thought leaks in Telegram.
  • Consider adding test cases to ensure the regex filter correctly matches all known thought tag variants.
  • Check the filter's handling of numbers and special characters to prevent similar issues in the future.

Example

No code snippet is provided as the issue does not include the current regex filter implementation.

Notes

The solution assumes that the existing regex filter is the cause of the issue and that updating it will resolve the problem. If the issue persists after updating the filter, further investigation may be needed.

Recommendation

Apply workaround: Update the regex filter to match the new variant, as this is a targeted fix for the identified issue and does not introduce new dependencies or version upgrades.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING