openclaw - ✅(Solved) Fix [Bug]: [2026.4.26] Tool call intermediate output bypasses SOUL.md output filter rules [1 pull requests, 3 comments, 3 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#75077Fetched 2026-05-01 05:38:22
View on GitHub
Comments
3
Participants
3
Timeline
11
Reactions
2
Timeline (top)
commented ×3mentioned ×2subscribed ×2closed ×1

Tool call intermediate steps bypass SOUL.md output filter rules after upgrade to 2026.4.26

Root Cause

Tool call intermediate steps bypass SOUL.md output filter rules after upgrade to 2026.4.26

Fix Action

Fix / Workaround

Tool call intermediate steps bypass SOUL.md output filter rules after upgrade to 2026.4.26

Output filter is a core UX feature. Leaked tool call steps expose internal system details to users and break the intended Chinese-only natural language interface. Workaround: manually ignore leaked output. No data loss or crash.

PR fix notes

PR #75079: fix(providers): enforce final output filtering

Description (problem / solution / changelog)

Summary

  • Switch MiniMax and OpenRouter provider hooks to tagged reasoning output so auto-reply runs enable the existing runtime <final> gate.
  • Update provider and auto-reply tests to cover the final-gate selection, and remove a stale Telegram test helper that blocked the required extension lint lane.
  • Add a changelog fix entry for the reported channel-output leak.

Root Cause

MiniMax and OpenRouter declared native reasoning output mode, so auto-reply runs did not enable enforceFinalTag. When models emitted tool-call narration or runtime context as ordinary assistant text, the subscriber treated it as user-visible text instead of discarding it outside <final>.

Linked Issue

Fixes #75077.

Why This Is Safe

This is a provider-policy change that reuses the existing runtime-enforced final-tag filter. It does not change tool execution, replay policy, stream wrappers, auth, model catalogs, or channel delivery contracts. Gemini-backed replay handling and MiniMax fast-mode stream wrapping remain in place.

Security And Runtime Controls Unchanged

The existing runtime <final> extraction/suppression logic remains the enforcement point. Tool approval, provider replay sanitization, downgraded tool-call stripping, message delivery dedupe, and channel send permissions are unchanged.

Tests Run

  • git diff --check
  • pnpm test extensions/minimax/index.test.ts extensions/openrouter/index.test.ts src/auto-reply/reply/agent-runner-utils.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.filters-final-suppresses-output-without-start-tag.test.ts -- --reporter=verbose
  • pnpm check:changed

Out Of Scope

  • Parsing arbitrary SOUL.md prose as a separate policy language.
  • Changing provider model catalogs, fallback selection, or thinking-level defaults.
  • Broadening final-tag enforcement to every provider.

Made with Cursor

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/minimax/index.test.ts (modified, +3/-3)
  • extensions/minimax/provider-registration.ts (modified, +1/-1)
  • extensions/openrouter/index.test.ts (modified, +2/-2)
  • extensions/openrouter/index.ts (modified, +1/-1)
  • extensions/telegram/src/draft-stream.test.ts (modified, +0/-8)
  • src/auto-reply/reply/agent-runner-utils.test.ts (modified, +3/-2)

Code Example

SOUL.md output filter rules (Section 4):
"执行过程中只用自然语言报告进程,不输出代码块、命令、JSON、工具调用细节"
"禁止在Telegram对话中显示任何代码块或技术细节"

SOUL.md final section:
"以下内容绝对不出现在给老大的回复里:
- OpenClaw runtime context(标记为'runtime-generated'的任何内容)
- 内部命令执行结果
- agent内部状态、session元数据
- 任何包含'Keep internal details private'标记的内容"

Leaked output examples (screenshots attached):
1. "OpenClaw runtime context for the immediately preceding user message. 
   This context is runtime-generated, not user-authored. Keep internal details private."
2. "Let me re-read to get exact text."
3. "I see the issue - I was trying to edit two files in one edit call, 
   and the second oldText didn't exist in memory.md. Let me do them separately."

收到 /sync,解析:memory 和 claude-tips 两个文件。先读取再操作。


Let me re-read to get exact text.


I see the issue - I was trying to edit two files in one edit call, and the second oldText didn't exist in memory.md. Let me do them separately.


Now add the changelog entry to memory.md:


Now update claude-tips.md:
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Tool call intermediate steps bypass SOUL.md output filter rules after upgrade to 2026.4.26

Steps to reproduce

  1. Configure SOUL.md with output filter rules (Section 4 and final section)
  2. Send any message that triggers tool calls (e.g. file read/write operations)
  3. Observe that English tool call intermediate steps appear in user-facing reply

Example trigger message: "/sync [memory update content]" Example leaked output:

  • "Let me re-read to get exact text."
  • "I see the issue - I was trying to edit two files..."
  • "OpenClaw runtime context for the immediately preceding user message. This context is runtime-generated, not user-authored. Keep internal details private."

Expected behavior

Tool call intermediate steps are silently filtered before output to user. Only the final result in natural language (Chinese) is shown.

Actual behavior

English tool call intermediate steps appear directly in user-facing replies, bypassing all SOUL.md output filter rules.

Examples observed:

  • "Let me re-read to get exact text."
  • "I see the issue - I was trying to edit two files in one edit call..."
  • "OpenClaw runtime context for the immediately preceding user message. This context is runtime-generated, not user-authored. Keep internal details private."

SOUL.md filter rules are present and correctly configured but have no effect.

OpenClaw version

openclaw-2026.4.26-da6bdffc3d96

Operating system

macOS 26.3.1 (a) (25D771280a), Apple Silicon (M4)

Install method

Official installer / CLI update (openclaw update)

Model

MiniMax-M2.7 (primary)

Provider / routing chain

MiniMax M2.7 → Gemini 2.5 Flash-Lite → OpenRouter free (fallback chain) Primary routing: api.minimaxi.com/anthropic (third-party relay, sk-cp- key)

Additional provider/model setup details

  • Primary model: MiniMax-M2.7 via third-party Anthropic-compatible relay (api.minimaxi.com)
  • Fallback 1: Gemini 2.5 Flash-Lite
  • Fallback 2: OpenRouter free tier
  • Environment variables injected via launchd plist (not .zshrc)
  • Gateway plist: ~/Library/LaunchAgents/ai.openclaw.gateway.plist

Logs, screenshots, and evidence

SOUL.md output filter rules (Section 4):
"执行过程中只用自然语言报告进程,不输出代码块、命令、JSON、工具调用细节"
"禁止在Telegram对话中显示任何代码块或技术细节"

SOUL.md final section:
"以下内容绝对不出现在给老大的回复里:
- OpenClaw runtime context(标记为'runtime-generated'的任何内容)
- 内部命令执行结果
- agent内部状态、session元数据
- 任何包含'Keep internal details private'标记的内容"

Leaked output examples (screenshots attached):
1. "OpenClaw runtime context for the immediately preceding user message. 
   This context is runtime-generated, not user-authored. Keep internal details private."
2. "Let me re-read to get exact text."
3. "I see the issue - I was trying to edit two files in one edit call, 
   and the second oldText didn't exist in memory.md. Let me do them separately."

收到 /sync,解析:memory 和 claude-tips 两个文件。先读取再操作。


Let me re-read to get exact text.


I see the issue - I was trying to edit two files in one edit call, and the second oldText didn't exist in memory.md. Let me do them separately.


Now add the changelog entry to memory.md:


Now update claude-tips.md:

Impact and severity

Medium

Output filter is a core UX feature. Leaked tool call steps expose internal system details to users and break the intended Chinese-only natural language interface. Workaround: manually ignore leaked output. No data loss or crash.

Additional information

  • This regression is specific to 2026.4.26. Output filter worked correctly on previous versions.
  • Related issue: #66977 (sqlite-vec / node:sqlite compatibility regression, same version)
  • The filter rules are loaded correctly (confirmed via SOUL.md inspection), suggesting the filtering mechanism itself was broken in this release, not the configuration.
  • Third-party model relay may be a factor, but the same behavior is observed across all models in the fallback chain.

extent analysis

TL;DR

The issue can be fixed by reverting to a previous version of OpenClaw where the output filter worked correctly or by temporarily modifying the SOUL.md filter rules to explicitly block the leaked tool call intermediate steps.

Guidance

  • Verify that the SOUL.md filter rules are correctly configured and loaded by inspecting the rules in Section 4 and the final section.
  • Check if the issue persists across different models in the fallback chain to determine if the problem is specific to the primary model or a more general issue.
  • Consider adding explicit rules to the SOUL.md filter to block the specific leaked output examples mentioned, such as "Let me re-read to get exact text" and "I see the issue - I was trying to edit two files in one edit call..."
  • Review related issue #66977 for potential clues on how to address the filtering mechanism breakage in this release.

Example

No code snippet is provided as the issue seems to be related to configuration and filtering rather than code.

Notes

The fix may not be straightforward due to the complexity of the system and the involvement of third-party models and relays. The issue's impact is medium, and a workaround of manually ignoring leaked output is available, but a proper fix is necessary to restore the intended user experience.

Recommendation

Apply a workaround by modifying the SOUL.md filter rules to explicitly block the leaked tool call intermediate steps until a fixed version of OpenClaw is available. This approach is chosen because it directly addresses the symptom (leaked output) and can be implemented without waiting for a new version of OpenClaw.

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…

FAQ

Expected behavior

Tool call intermediate steps are silently filtered before output to user. Only the final result in natural language (Chinese) is shown.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: [2026.4.26] Tool call intermediate output bypasses SOUL.md output filter rules [1 pull requests, 3 comments, 3 participants]