Skip to content

Refuse conflicting Claude identity during startup - #1090

Merged
taras merged 3 commits into
mainfrom
codex/fix-sessionstart-conflict-1088
Nov 3, 2026
Merged

taras merged 3 commits into
mainfrom
codex/fix-sessionstart-conflict-1088

Conversation

@taras

@taras taras commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Why

Claude session opening could succeed after receiving contradictory SessionStart identity confirmations. Async iterator cleanup could release an optional startup lookup before the reader's outer catch recorded the failure.

Closes #1088.

What changes

Before: optional setup could fall back and publish the session despite the contradiction.

After: the adapter records the identity failure before iterator cleanup and checks failure/disposal again immediately before publication. A deterministic fixture emits the contradiction during the actual context-usage request.

Review guide

Start with the new optional-setup case in packages/acp/tests/adapter-protocol.test.ts and the regenerated Claude archive's dist/acp-agent.js. The original confirmation tests and assertions remain intact.

How to verify it

  • The permanent regression fails on the old artifact and on an incomplete publication-only fix, then passes on the corrected artifact.
  • Focused integration evidence: 13 Deno suites / 126 steps; 24 Node protocol tests; 11 upstream startup, materialization and checkpoint tests.
  • The first integrated Node run hit the separate flake: Claude startup disposal can return before backend close #1086 disposal-ordering failure. One rerun on the identical candidate and dependency inputs passed. flake: Claude startup disposal can return before backend close #1086 remains open.
  • Current-main permission and host-file checks: 4 suites / 41 steps passed.
  • Local Node is 26.5.1. CI2382 passed on this head: 55 jobs succeeded with one expected skip.

Generated or mechanical changes

The Claude archive is built from recorded source bea799c86d16ed2b1bf1cfe8d7fd6e22e6525b56 with the upstream build/pack process. Manifest, provenance, source-pin check and embedded bytes match it. Repeat packing and generation are verified. Codex bytes are unchanged.

Risks and limitations

Required CI2382 passed on this head, including the configured CI runtimes. This PR does not claim a disposal-ordering fix for #1086.

Scope confirmation

  • Every changed file supports the startup identity-refusal repair.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated changes are identified.
  • The description reflects the current diff and focused evidence.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

PR #1090: Refuse conflicting Claude identity during startup

6 files, +2734 / -2674

Scope

🔴 PR has 5408 lines changed. Split into focused PRs.

🟡 5408 lines changed. PRs under 400 receive more thorough review.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras marked this pull request as ready for review November 3, 2026 16:24

@taras taras left a comment

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.

Independent Fable review

Reviewed commit: aa3227f162a92a3b5f857808b0327eff12befe78

Reviewer: Claude, configured model fable, reasoning effort high. The coordinator publishes the retained independent review; no new review call was made.

Verdict: PASS. Both accepted requirements are covered; all three observations below are nonblocking.

The workflow rejected only the summary length: 1,270 characters against a 1,200-character limit. Taras explicitly accepted this exact review unchanged as a one-time exception. The shared schema remains unchanged.

Summary

Signed merge aa3227f preserves the seven owned #1088 paths byte-for-byte from 8485a70, and its patch relative to main bddf524 equals the original base-to-feedback patch (same SHA-256). The vendored Claude tarball matches MANIFEST (195823 bytes, sha256 6490fb5d...), both embedded base64 payloads decode to the committed tarballs, and the vendor pin equals the manifest. Extracting old and new tarballs shows only dist/acp-agent.js and its .d.ts.map differ, and that dist delta is exactly the upstream patch: the reader stores the identity-refusal Error before throwing (iterator return would otherwise reject the held getContextUsage lookup, which readResumedLiveModel swallows), and publication rechecks queryFailure and disposal after the last await with no intervening await before insertion or response. Public declarations, acceptance, checkpoint and the joined setup-catch reader are unchanged. The permanent production-artifact case gates on the real get_context_usage request and holds it until Query closure, so ordering is deterministic without sleeps; retained receipts bind the failing run to main's snapshot bytes (failure undefined at line 555 after the gate assertion passed) and the passing run to the committed snapshot. Both acceptance clauses hold.

Accepted requirements

  • refuse-contradictory-startup
  • preserve-native-checkpoint-acceptance

Nonblocking observations

  1. The added this.disposed recheck before publication (packaged dist/acp-agent.js:5139) closes a real parallel gap (dispose() during optional setup ends the reader cleanly without a queryFailure, so the session would otherwise be inserted into a disposed agent), but no retained test exercises that branch. It mirrors the existing post-initialization check and is harmless; worth a focused upstream case when that path is next touched.
  2. Issue #1086 (held-helper disposal ordering) failed once on the integrated candidate in attempt 0003 (observed dispose-start, dispose-return, backend-close) and passed on the single authorized identical-input rerun in attempt 0004. It is unrelated to this repair and remains unresolved/intermittent; Root owns the flake issue and the Node22/CI delivery gates. No local Node22 evidence exists (local runs are Node 26.5.1).
  3. MANIFEST patchedCommit bea799c8 is a scratch upstream commit reproducible only through the retained upstream-final-source.patch and build receipts, the same convention the prior pin 54df80cb used; PROVENANCE.md states this. The pullRequest link to upstream PR 1047 is unchanged and does not carry this delta.

Retained original response SHA-256: 7efdc62f92df8bcc331a9e8aa72f7c2e2e8bc86ac2ab20b4558c24d1b67bc3d4.

@taras
taras merged commit b5e22db into main Nov 3, 2026
58 checks passed
@taras
taras deleted the codex/fix-sessionstart-conflict-1088 branch November 3, 2026 17:19
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.

flake: conflicting Claude SessionStart confirmation does not always refuse

1 participant