fix: keep codex webchat replies automatic#81110
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. by source inspection: current main applies the Codex Real behavior proof Next step before merge Security Review detailsBest possible solution: Land one narrow WebChat/Codex delivery fix that keeps internal WebChat replies visible while preserving message-tool delivery for explicit external origins. Do we have a high-confidence way to reproduce the issue? Yes by source inspection: current main applies the Codex Is this the best way to solve the issue? Yes: the patch targets the harness-default path for internal-only WebChat contexts and adds a regression for explicit external-origin WebChat, which is the narrow maintainable boundary for this bug. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 73abe9e98a29. |
|
Added a gateway-level WebChat proof for the ClawSweeper real-behavior gate. What changed after the review:
Validation from
|
|
Addressed the ClawSweeper internal-only WebChat finding in |
|
Thanks @100yenadmin for digging into this and for separating internal WebChat from external-origin delivery here. That helped clarify the real product boundary. I’m going to close this in favor of #81586. The reason is that this PR makes internal WebChat automatic again, which is a reasonable safety patch, but it routes around the Codex harness contract instead of fixing the missing sink. In Codex message-tool-only mode, the model is expected to use That preserves explicit external channel routing and fixes the TUI/WebChat shape the same way, without adding a fallback or suppressing Codex’s intended message-tool path. |
|
@pashpashpash looks like #81586 landed the broader internal-UI message-tool sink for the same WebChat/Codex issue this PR was carrying as the option-2 renderer path. All good on the final shape, but I think your clanker forgot two housekeeping bits: close this as superseded and credit me / #81144 in the changelog 😄 |
This PR separates internal WebChat turns from external channel-origin WebChat delivery so Codex harness defaults do not accidentally suppress normal same-surface replies. Internal WebChat keeps automatic final delivery, while explicit external origins still use the message-tool-only policy where that contract is required.
Summary
This is the narrow safety fix for #81109. Codex harnesses default direct visible replies to the
messagetool, which is right for external direct-chat surfaces, but internal WebChat is not an outbound delivery target. This PR keeps WebChat-only turns automatic so the user sees the assistant's final reply, while preservingmessage_tool_onlyfor explicit external origins that happen to be operated through WebChat.message(action="send"), producingSent.or no useful visible answer.sourceVisibleReplies: "message_tool"defaults are skipped only for internal-only WebChat source contexts.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
/Volumes/LEXAR/repos/openclaw-codex-webchat-delivery, branchfix/codex-webchat-direct-delivery, latest patchd34e6ee76d4, including dispatch policy tests and in-process Gateway WebSocket WebChat proof.sourceReplyDeliveryMode === "automatic",queuedFinal === true, and the final payload text isvisible webchat reply. The new external-origin regression assertssourceReplyDeliveryMode === "message_tool_only",queuedFinal === false, and no automatic final WebChat send occurs for an explicitOriginatingChannel: "imessage"route.Root Cause (if applicable)
chat.sendcan carry WebChat surface metadata while explicitly operating on behalf of another channel.message_tool_only.Regression Test Plan (if applicable)
src/auto-reply/reply/dispatch-from-config.test.ts,src/gateway/server.chat.gateway-server-chat-b.test.tschat.sendroute without needing a browser.User-visible / Behavior Changes
Internal WebChat Codex replies render automatically again. WebChat sessions that explicitly deliver on behalf of an external channel still preserve message-tool-only behavior.
Diagram (if applicable)
flowchart LR turn["Incoming WebChat turn"] --> origin{"External origin?"} origin -->|no| internal["Internal WebChat"] internal --> auto["Automatic final reply"] origin -->|yes| external["Explicit external-origin route"] external --> messageOnly["message_tool_only contract"] messageOnly --> channel["Channel-specific delivery"]Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
deliveryDefaults.sourceVisibleReplies: "message_tool"Steps
message_tool_only.Expected
Actual
Evidence
Human Verification (required)
OriginatingChannel: "webchat"vsOriginatingChannel: "imessage", explicit deliver route, Codex harnessmessage_tooldefault.Review Conversations
ClawSweeper P2 addressed by
d34e6ee76d4: limit the WebChat bypass to internal-only sources.Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoRisks and Mitigations