fix(codex): continue turns after progress replies#108487
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
This was referenced Jul 16, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 16, 2026
* fix(codex): defer omitted source reply finality * test(codex): refresh source reply prompt snapshots
steipete
added a commit
that referenced
this pull request
Jul 18, 2026
Backport #108487 for the 2026.7.1 correction release. Co-authored-by: joshavant <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #106961
Maintainer replacement for #107274 and #107388. Those patches correctly stop treating every delivered source reply as immediately terminal, but leave omitted finality unresolved. This change owns that state through authoritative
turn/completedfinalization so progress can continue and a successful turn still gets one final source reply.AI-assisted with Codex; implementation understood and reviewed.
What Problem This Solves
Codex-backed channel turns could stop after an intermediate
messagetool reply. The source channel received the progress update, but later tools and the final response never ran.Why This Change Was Made
Omitted source-reply finality is now pending until the authoritative Codex turn outcome. Explicit
final: trueremains terminal, explicitfinal: falseremains progress, and explicit yield behavior is unchanged. On a successful turn, only the latest omitted source reply becomes final; on failure, omitted replies remain non-final so recovery is preserved.The successful finalization path also clears stale empty/reasoning-only output classification when a final visible source reply was delivered. This keeps the fix inside the Codex plugin owner without adding config, protocol, or compatibility surfaces.
User Impact
Agents can send progress to Discord, Telegram, and other source channels, continue working, and finish with a final reply. Failed turns do not incorrectly promote a progress message to final.
Evidence
tsgo:extensions,tsgo:extensions:test, and the full Codex extension suite passed.ff8a015981e94d1ec353586e0a4b612ac4099d2c: progress delivered and omitted finality reproduced; continuation marker absent and final delivery absent (Crabbox run).7a1a087bd07942adff6d52040343b616674044b6: progress delivered with omitted finality; continuation marker present and final delivery present (Crabbox run).origin/main: touched files unchanged from the tested base; merge-tree check is clean.check:changedreached the pre-existing Plugin SDK baseline hash mismatch also reproduced on cleanmain; generated API JSON/JSONL contents were byte-identical between cleanmainand this patch.