Skip to content

fix(chat): clear Codex copies after transcript confirmation - #62

Merged
christso merged 1 commit into
christso/mainfrom
fix/codex-native-user-receipt
Nov 22, 2026
Merged

christso merged 1 commit into
christso/mainfrom
fix/codex-native-user-receipt

Conversation

@christso

Copy link
Copy Markdown
Owner

Change

A delivered Codex follow-up could appear in Chat while its queued copy still said “Not confirmed.” Ovis now clears the copy when it finds a unique completed user item with matching text in the pane’s bound Codex session.

The terminal echo check can time out after Codex accepts a follow-up. Codex 0.170 and 0.171 record acceptance as item_completed with a UserMessage. The receipt matcher checks that event’s thread ID before clearing the queue entry. Previous fix

Validation

  • Replayed anonymized records from both reports. The deployed code confirmed neither. This patch confirmed each once.
  • All 201 tests passed across server/codex-steering.test.ts, server/codex-delivery.test.ts, server/core/codex-reconciliation.test.ts and server/pending-input.contract.test.ts. The watcher test verifies that the queued copy clears without additional input.
  • bun run check fast passed type checking and the build, then reported failures in device notices, the device journal and Zsh setup. Both device suites also failed locally on the base revision. The Zsh suite passed when rerun in isolation on both revisions. The check also noted that the commit was made during the run.
  • Full integration, browser regression and native Windows suites were skipped locally.

Compound Engineering

Codex records accepted follow-ups as completed UserMessage items. Consume a matching item from the bound rollout to clear the uncertain queued row after the terminal check times out.
@christso
christso merged commit e6cef9b into christso/main Nov 22, 2026
21 checks passed
devswha added a commit to devswha/ovis that referenced this pull request Nov 26, 2026
## Change

After Codex accepts a follow-up sent with **Send now**, Ovis can show
the message in Chat and leave the queued copy marked **Not confirmed**.

Clear the copy when Codex shows the newly accepted message above its
working status. If the terminal check times out, look for a completed
user item in the bound Codex transcript. Ovis clears the copy when one
new item matches one tracked send and the same Codex process still owns
the pane. If the evidence is missing or ambiguous, Ovis keeps the copy.
Confirming delivery sends no additional terminal input.

This adapts the fix from the MIT-licensed Ovis fork. [Terminal
check](christso#61) · [Receipt
tracking](christso#18) · [Completed user
events](christso#62)

Fixes #4465

## Validation

- Reproduced the duplicate with real Codex 0.171.0 on upstream `main` at
`e16802a2`. Codex recorded one user message, and Ovis kept one **Not
confirmed** copy. [Reproduction and
recordings](#4465)
- The contract regression checks that a late completed user item clears
the copy without sending any more input. Unit tests cover matching text
from another send, a process replacement during reconciliation, and a
send refused before input.
- `bun run typecheck` passed.
- All 130 tests in `server/pending-input.contract.test.ts` passed in an
isolated Herdr session.
- 145 tests passed across `server/codex-delivery.test.ts`,
`server/codex-steering.test.ts`,
`server/core/codex-reconciliation.test.ts` and
`server/pending-input.test.ts`.
- 98 tests passed across `server/core/pending.test.ts`,
`server/core/pending-agy-send-now.test.ts` and
`scripts/changelog-fold.test.ts`.
- 285 tests passed across `server/codex-live-rendered.test.ts` and
`server/codex-processes.test.ts`. All 25 tests in
`server/conventions.test.ts` also passed.
- Full integration, browser and native platform suites were skipped
locally.

---------

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant