Skip to content

fix(codex): continue turns after progress replies#108487

Merged
joshavant merged 2 commits into
mainfrom
fix/codex-source-reply-finalization-106961
Jul 15, 2026
Merged

fix(codex): continue turns after progress replies#108487
joshavant merged 2 commits into
mainfrom
fix/codex-source-reply-finalization-106961

Conversation

@joshavant

Copy link
Copy Markdown
Contributor

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/completed finalization 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 message tool 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: true remains terminal, explicit final: false remains 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

  • Fresh autoreview: no accepted or actionable findings (confidence 0.9).
  • Focused Codex app-server tests: 219 passed; dynamic-tool tests: 110 passed.
  • Remote Testbox: tsgo:extensions, tsgo:extensions:test, and the full Codex extension suite passed.
  • Live baseline reproduction on ff8a015981e94d1ec353586e0a4b612ac4099d2c: progress delivered and omitted finality reproduced; continuation marker absent and final delivery absent (Crabbox run).
  • Live fix proof on 7a1a087bd07942adff6d52040343b616674044b6: progress delivered with omitted finality; continuation marker present and final delivery present (Crabbox run).
  • Current origin/main: touched files unchanged from the tested base; merge-tree check is clean.
  • check:changed reached the pre-existing Plugin SDK baseline hash mismatch also reproduced on clean main; generated API JSON/JSONL contents were byte-identical between clean main and this patch.

@joshavant joshavant self-assigned this Jul 15, 2026
@joshavant
joshavant merged commit 8e6f966 into main Jul 15, 2026
104 checks passed
@joshavant
joshavant deleted the fix/codex-source-reply-finalization-106961 branch July 15, 2026 23:27
@joshavant

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Discord/Codex runtime: message tool is terminal, so progress updates silently end the turn

1 participant