Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Two issues after tool execution: (1) stdout messages from internal scripts leak into chat channel;
(2) final LLM response generation gets cut off after all tools succeed, showing 'Agent could not generate a response'
Steps to reproduce
Issue 1: Agent runs internal Python scripts (e.g. output_gate.py) via exec tool. Scripts print status to stdout. Messages appear in chat channel as visible replies instead of being suppressed.
Issue 2: Agent executes tool calls. All tools return successfully. During final response generation, LLM stream cuts off. User sees error: 'Agent could not generate a response. Note: some tool actions may have already been executed - please verify before retrying.' Reproduced twice at 19:46 and 19:51 CST on 2026-06-08.
Expected behavior
Issue 1: Internal script stdout should not be forwarded to external chat channels.
Issue 2: After all tool calls succeed, the LLM should complete response generation and deliver the reply to the user.
Actual behavior
Issue 1: BLOCK/WARN status messages from output_gate.py appear in WeChat chat.
Issue 2: All 3 tool calls succeeded (file write), but final response never arrived. Error message displayed instead.
OpenClaw version
2026.6.1
Operating system
Windows11
Install method
npm global
Model
deepseek/deepseek-v4-flash
Provider / routing chain
openclaw -> deepseek
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Issue 1: Affects all users. Medium severity. Internal status text leaks to chat, confusing users.
Issue 2: Affects agent reply reliability. High severity. Blocked replies require retry.
Additional information
Each issue can be reproduced independently. Issue 1 workaround: redirect script output to stderr.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 8, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 12:34 PM ET / 16:34 UTC.
Summary
Keep open: current main and v2026.6.9 still contain the generic verbose/full command-output path and the replay-unsafe incomplete-turn error path. The final-response half overlaps #88657, but the internal stdout visibility concern is distinct and still needs maintainer policy/security review.
Reproducibility: Partially: current-main source and tests show the verbose command-output delivery path and the replay-unsafe incomplete-turn error path. The exact WeChat stdout leak and DeepSeek final-stream cutoff have not been live-reproduced from this report because logs, screenshots, provider payloads, and transcript evidence are missing.
Ways to help us reproduce this
Next step
Manual review is needed because the stdout behavior is a product/security boundary and the final-response cutoff needs replay-policy and live provider evidence.
Security
Needs attention: The issue is security-sensitive because current source allows command/tool stdout to become chat-visible under verbose/full behavior, and the desired suppression boundary is not yet defined.
Review details
Best possible solution:
Split the work into a maintainer-defined core policy for internal stdout visibility and the replay-safety/provider investigation already centered on #88657.
Do we have a high-confidence way to reproduce the issue?
Partially: current-main source and tests show the verbose command-output delivery path and the replay-unsafe incomplete-turn error path. The exact WeChat stdout leak and DeepSeek final-stream cutoff have not been live-reproduced from this report because logs, screenshots, provider payloads, and transcript evidence are missing.
Is this the best way to solve the issue?
Unclear: suppressing all stdout would conflict with documented verbose-full behavior, while retrying every replaySafe=no turn could duplicate side effects. The maintainable fix needs a narrower maintainer-approved policy boundary for internal output and replay-safe recovery.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against c2ee9b0be8ae.
Label changes
Label justifications:
P2: The issue affects chat-visible tool output and post-tool reply reliability, but the remaining fix is bounded and policy-sensitive rather than a core outage.impact:security: Internal command or tool stdout reaching an external chat can expose private operational details or command output.impact:message-loss: The final-response cutoff leaves the user without the expected assistant reply after tool actions complete.impact:auth-provider: The second symptom is tied to a specific provider/model route through DeepSeek and incomplete provider turns.Evidence reviewed
Security concerns:
src/agents/embedded-agent-subscribe.handlers.tools.ts:1107Current source emits exec output through command_output callbacks and later resolves visible tool payloads for channel delivery; maintainers should define which internal script output must never be forwarded to external chats.
Confidence: 0.74
Acceptance criteria:
What I checked:
src/auto-reply/reply/agent-runner-helpers.ts:83, c2ee9b0be8ae)src/agents/embedded-agent-subscribe.handlers.tools.ts:1107, c2ee9b0be8ae)src/auto-reply/reply/dispatch-from-config.ts:2951, c2ee9b0be8ae)docs/tools/thinking.md. (docs/tools/thinking.md:89, c2ee9b0be8ae)docs/gateway/security/index.md. (docs/gateway/security/index.md:725, c2ee9b0be8ae)Likely related people:
src/auto-reply/reply/agent-runner-helpers.ts,src/auto-reply/reply/dispatch-from-config.ts,src/agents/embedded-agent-runner/run/incomplete-turn.ts)src/agents/embedded-agent-subscribe.handlers.tools.ts,src/auto-reply/reply/agent-runner-helpers.ts,src/agents/embedded-agent-runner/run.ts)src/agents/embedded-agent-runner/run/incomplete-turn.ts,src/agents/embedded-agent-runner/run.ts,src/agents/embedded-agent-runner/run.empty-error-retry.test.ts)src/agents/embedded-agent-runner/run/incomplete-turn.ts,src/agents/embedded-agent-runner/run.incomplete-turn.test.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.openclaw-barnacle commentedon Jul 6, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 14, 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.