Skip to content

Retain screened diagnostics when Sidekick resume fails - #1391

Merged
taras merged 3 commits into
mainfrom
codex/resume-diagnostics-retention-1388
Nov 17, 2026
Merged

taras merged 3 commits into
mainfrom
codex/resume-diagnostics-retention-1388

Conversation

@taras

@taras taras commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Why

A Sidekick reconnect can fail before the prompt reaches the adapter. XMD could report that resume failed while losing the adapter’s explanation and the failed attempt on reopen.

What changes

XMD retains a failed pre-prompt resume with the original conversation and the existing recovery message. It records a screened set of diagnostic fields when the adapter provides them. The dependent PR uses that record to show the detail in Sidekick chat.

How it works

The ACP provider classifies the refusal and selects bounded facts. The Agent screens those facts and records one failed attempt after the connection scope settles. Sidekick associates the attempt with its originating request and preserves the existing recovery choices.

Review guide

Start with the changes in packages/agent/src/conversation.ts and packages/acp/src/provider.ts. Follow the record through packages/agent/src/journal.ts and the Sidekick request association in packages/cli/src/repl/sidekick/model.ts.

How to verify it

  • The controlled ACP reconnect tests cover refusal before prompt delivery, approved and screened diagnostics, and a later explicit send to the same native conversation.
  • The held Agent and mounted recovery tests cover the saved attempt, request association, and recovery choices.
  • The Journal tests cover passive reads of the saved failure. Type checking and the ACPX vendor verification passed.

The active-writer case was reproduced in a disposable conversation. The original intermittent incident remains unattributed.

Related to #1388.

@taras

taras commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

Independent review PASS on bdaa7c7a34cd9b3277762cdec8b282ed5777dbd7.

Reviewed with Codex Astra gpt-6-astra under the standing Fable fallback. Fable’s quota-limited earlier prerequisite attempt and the earlier dependent verdict remain retained separately. The corrected prerequisite fixes the Bun assertion mutation. The dependent diff remains byte-identical to the earlier presentation diff.

Reviewed the exact assigned commit against ae7424a and examined all three acceptance clauses against the original implementation plan. No blocking correctness defect or material ambiguity found. Traced refusal classification, screened persistence, reconstruction, held replay, request association and recovery through affected consumers. Reused recorded focused tests, vendor validation and typecheck evidence, including the corrected refusal tests passing under Deno, Bun and Node. No additional test run was needed to distinguish a finding. Dependent presentation changes were excluded. Source remains unchanged; all commands started during this review completed.

Required CI passed on this exact head in run 44128661346.


describe(
"a held Codex conversation across a host CLI upgrade",
"1388 — resume retention: a held Codex conversation across a host CLI upgrade",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not include issue numbers in code

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the issue numbers this PR added to test names and the synthetic native identity in 4c32dd3. The dependent presentation test title is also cleaned up in the restacked #1392.

taras commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

Fixed in 4c32dd3482fe08fbdb8f1515397b2c0761ff923f.

Removed the projectRuntimeError export. XMD selects the bounded early-resume diagnostics from the existing error and cause chain, then uses the existing Agent screening and persistence. Every vendored ACPX file now matches the PR's main base ae7424a7de684d62bd60ba83480a5f9f1392882d exactly. The spec inventory reflects that ownership. The issue numbers added to test names and the synthetic identity are also removed following the inline review.

Independent review: PASS on this exact commit, Codex Astra gpt-6-astra, using the documented Fable quota fallback. No blocking findings. The reviewer checked correctness, minimalism, vendor restoration, diagnostics selection, screening, and the real callers. One nonblocking note: XMD retains the supplied output classification rather than inferring NO_SESSION from resource-not-found text, consistent with the spec's supplied-classification contract.

Focused validation passed:

  • ACP/Agent diagnostics, resume and cancellation selection: 35 steps.
  • Vendor verification: 12 steps; no vendor diff against the PR base.
  • Node and Bun: all seven affected refusal cases under each runtime.
  • Mounted recovery: seven steps. The restacked presentation/recovery selection also passes all eleven steps.
  • Changed-file formatting, lint (zero errors), and git diff --check.
  • deno task verify:clean against this signed prerequisite commit.

#1392 is restacked on this head. Both PRs remain draft; required CI remains a merge gate.

@taras
taras marked this pull request as ready for review November 17, 2026 18:13
@taras
taras added this pull request to stack #1394 November 17, 2026 19:52
@taras
taras merged commit 42d0155 into main Nov 17, 2026
64 checks passed
@taras
taras deleted the codex/resume-diagnostics-retention-1388 branch November 17, 2026 19:53
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