Skip to content

fix(codex): force message tool for source replies#76663

Merged
steipete merged 2 commits into
openclaw:mainfrom
VishalJ99:codex/codex-source-message-tool
May 3, 2026
Merged

fix(codex): force message tool for source replies#76663
steipete merged 2 commits into
openclaw:mainfrom
VishalJ99:codex/codex-source-message-tool

Conversation

@VishalJ99

Copy link
Copy Markdown
Contributor

Summary

  • force the Codex app-server dynamic tool build to keep message available when source reply delivery is message_tool_only
  • cover the tools.profile = "coding" case that otherwise filters message out while automatic source delivery is suppressed
  • add an unreleased changelog fix entry

Fixes #76660.

Validation

  • pnpm test extensions/codex/src/app-server/run-attempt.test.ts
  • pnpm exec oxfmt --check --threads=1 extensions/codex/src/app-server/run-attempt.ts extensions/codex/src/app-server/run-attempt.test.ts
  • OPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm check:changed

Note: the first local test invocation used an invalid Jest-only --runInBand flag and failed before tests ran; the valid command above passed.

@clawsweeper

clawsweeper Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR forces the Codex app-server dynamic tool build to include message for message_tool_only source replies, adds a coding-profile regression test, and records an Unreleased changelog fix with contributor credit.

Reproducibility: yes. from source inspection: dispatch can resolve a source reply to message_tool_only while current main's Codex app-server tool builder omits forceMessageTool, and the coding profile excludes message unless forced. I did not run live WhatsApp or Vitest in this read-only review.

Next step before merge
No repair lane is needed; the latest diff addressed the prior changelog-credit finding and the remaining action is normal maintainer merge/check gating.

Security
Cleared: The patch only changes an existing runtime tool-selection flag, a colocated regression test, and changelog text; it adds no dependency, workflow, secret-handling, or package execution surface.

Review details

Best possible solution:

Land the narrow app-server parity fix after normal maintainer merge and exact-head check gating so tool-only Codex source replies always expose message under restrictive profiles.

Do we have a high-confidence way to reproduce the issue?

Yes, from source inspection: dispatch can resolve a source reply to message_tool_only while current main's Codex app-server tool builder omits forceMessageTool, and the coding profile excludes message unless forced. I did not run live WhatsApp or Vitest in this read-only review.

Is this the best way to solve the issue?

Yes. Passing the resolved source-reply delivery mode into the existing forceMessageTool seam mirrors embedded and follow-up paths and is narrower than changing global profile policy or visible-reply fallback behavior.

What I checked:

Likely related people:

  • steipete: Local blame points the current app-server dynamic tool builder and forceMessageTool profile seam to recent Peter Steinberger work; the PR timeline also shows steipete updating the changelog credit on this branch. (role: recent maintainer; confidence: high; commits: 68b56108f61f, 39c5bbf08e12; files: extensions/codex/src/app-server/run-attempt.ts, src/agents/pi-tools.ts, extensions/codex/src/app-server/approval-bridge.ts)
  • Tyler Nishida: Recent path history shows work on message-tool-only fallback behavior through dispatch-from-config and related source-reply tests. (role: adjacent source-reply maintainer; confidence: medium; commits: 796c1e67c3d9; files: src/auto-reply/reply/dispatch-from-config.ts, src/auto-reply/reply/dispatch-from-config.test.ts, src/auto-reply/reply/get-reply-run.media-only.test.ts)
  • Josh Lehman: Recent path history shows chat-delivery and tool-progress maintenance touching the same dispatch surface. (role: adjacent chat-delivery maintainer; confidence: medium; commits: 30018bddc611; files: src/auto-reply/reply/dispatch-from-config.ts, src/auto-reply/reply/dispatch-from-config.test.ts, src/gateway/server-chat.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 6aa4fb7a69b2.

@steipete
steipete force-pushed the codex/codex-source-message-tool branch from e27cbf2 to 6aa9763 Compare May 3, 2026 14:24
@steipete
steipete marked this pull request as ready for review May 3, 2026 14:24
@steipete
steipete merged commit 0e4d28a into openclaw:main May 3, 2026
114 of 115 checks passed
@steipete

steipete commented May 3, 2026

Copy link
Copy Markdown
Contributor

Landed via squash merge onto main.

  • Gate: pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/codex/src/app-server/run-attempt.ts extensions/codex/src/app-server/run-attempt.test.ts; pnpm test extensions/codex/src/app-server/run-attempt.test.ts; git diff --check; Testbox OPENCLAW_TESTBOX=1 pnpm check:changed
  • Source head: 6aa9763
  • Merge commit: 0e4d28a

Thanks @VishalJ99!

lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
* fix(codex): force message tool for source replies

* docs: credit codex source reply fix (openclaw#76663) (thanks @VishalJ99)

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
* fix(codex): force message tool for source replies

* docs: credit codex source reply fix (openclaw#76663) (thanks @VishalJ99)

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* fix(codex): force message tool for source replies

* docs: credit codex source reply fix (openclaw#76663) (thanks @VishalJ99)

---------

Co-authored-by: Peter Steinberger <[email protected]>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* fix(codex): force message tool for source replies

* docs: credit codex source reply fix (openclaw#76663) (thanks @VishalJ99)

---------

Co-authored-by: Peter Steinberger <[email protected]>
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* fix(codex): force message tool for source replies

* docs: credit codex source reply fix (openclaw#76663) (thanks @VishalJ99)

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex source replies can complete privately when message-tool delivery is selected but the message tool is filtered out

2 participants