Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Recovers affected Codex conversations on the next user turn using the existing fresh-session context handoff. Recovery is scoped to the rejected history and guarded against pending background work, without changing sharing configuration or retrying the failed action. You can add or adjust custom eligibility rules. Learn more. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
332447e to
471b4c2
Compare
Extend the existing recovery in pingdotgg#28962 to interrupted or cancelled runs that already retain the root sharing-rejection item. Preserve native-session binding and the background-work fence. Ordinary interruptions without that error remain unchanged.
|
Sent a small follow-up to your existing branch: yelgabo#1 (head |
…tes-20261106 fix(server): retain sharing recovery after run interruption
|
Resolved the test-helper conflict by merging upstream main Validation on Windows with Node 26.12.1: all 60 ProviderSwitch.integration.test.ts cases pass, including the nine rejected-history scenarios and upstream terminal-state handoff cases. Server typecheck exits 0 (existing Effect suggestions only); changed-file formatting/lint and the commit-hook knip checks pass; git diff origin/main --check passes. The aggregate check:changed command was attempted but stopped while its ignored-file scan traversed the Windows dependency tree, before check execution; it is not reported as passing. No real-provider inference or live-state changes. GitHub now reports mergeable=true (mergeable_state=blocked, not dirty); remaining review/CI gates are separate. Model/harness: GPT-6.1 Sol through Codex. |
|
Additional Linux verification of the recovery change. Applied this PR’s production diff unchanged from Failing-first proofWithout the production recovery change:
With the recovery change restored, all nine passed. The background scenario checks both blocking replacement while work is pending and successful recovery after it finishes. These tests use T3’s orchestration/SQLite integration harness with a deterministic adapter, not the live provider. Separate real-provider checkThe three real-account reproductions described in #29992 left the parent history rejecting ordinary follow-ups. In each case, a fresh native session seeded with a small plaintext summary answered and completed another follow-up. That shows a text-only replacement remains usable on the same connection. It does not verify full transcript restoration or this PR’s automatic recovery path end-to-end against the real provider. Additional validationWith #28143 also applied, the complete two relevant test files passed 71 tests. Server-only typechecking passed with Node 26.12.1, emitting existing Effect suggestions.
Investigation assisted by GPT-6.1 Sol through Codex in T3 Code. |
|
This PR conflicts with See the conflict window. |
|
Note Written by Merged current main without rebasing and resolved the integration-helper conflict, preserving rejected-history tracking and main's held-tool and terminal-state behavior. Recovery now retains the native ownership check before creating a replacement session. Updated the existing history mock to return empty history unless a read failure is explicitly requested. Blacksmith verification passed: all 72 ProviderSwitch integration cases, then Head: |
A Codex turn rejected by ChatGPT sharing can leave its native conversation unable to answer any later prompt, including
huh. Nativethread/resumesucceeds, so T3 keeps reusing history that the provider rejects.On the next user turn, recognize the persisted
subscription_sharing_unsupported_capabilityfailure in the latest accepted root attempt and use the existing fresh-session/portable-history fallback. Keep the T3 thread, visible transcript, provider-thread identity, selected provider/model, and the original error. Do not automatically retry the failed action. Scope recovery to the affected native session; wait for pending background work before replacing it.Related: #21061. This is a focused recovery fix for an obvious reliability defect; it does not change native-agent availability or sharing configuration.
Expected rejection versus the recovery bug
The initial unsupported-capability rejection is expected when the configured runtime emits input that the sharing route does not support. It should not permanently poison subsequent ordinary text turns.
The reproduced managed process already had
features.multi_agent=falseandfeatures.multi_agent_v2=false, but native agents still ran. Closed/unmerged #20270 proposes addingagents.enabled=falseto prevent that mismatch. There is no verifiedenable=trueworkaround here. Prevention/configuration and recovery of existing affected histories are separate; this PR addresses recovery.Reproduction
Environment: Windows x64 10.0.26200, T3 0.1.6 (build
2359643cffa6), managed Codex 0.156.1,openai_token_sharing,gpt-6-astra/ high.BASELINE_OK: succeeds.collaboration.spawn_agent, whose worker repliesWORKER_OKwithout tools, followed bycollaboration.wait_agent.invalid_request_error,param=input,code=subscription_sharing_unsupported_capability,willRetry=false.huh: the same rejection occurs without an assistant reply or tool call. Model changes did not rescue the original affected thread.The parent and worker rollouts contain native
agent_messagerecords immediately before rejection. These support the invalid-history explanation; the exact outgoing Responses HTTP item was not captured.Original reproduction and sanitized protocol evidence.
Before/after verification
Public evidence gist: logs, runtime transcript, script, and validation manifest. All 13 files and the gist page were verified accessible without authentication. The original private-repository links were a publication error and have been replaced.
fa31b66bbb2a, the new recovery cases fail for live, detached, legacy, and pending-background-work histories. All 7 new cases pass with this patch, including unrelated-error/provider controls and an already-repaired native session. They use the real orchestrator, SQLite projections, and handoff delivery with a deterministic adapter that rejects every subsequent turn on the affected native ID.CODEX_HOME: resuming it and sendinghuhstill failed. A replacement native session carrying the conversation as text correctly recalledBASELINE_OK, then answeredFOLLOWUP_OKin that same session. No live install/state was patched. This checks the recovery mechanism, not a deployed T3 UI end-to-end.t3,@t3tools/evals, and@t3tools/scripts, and bothknip:checkpasses succeeded.vp run check:changedwas attempted but its ignored-file scan traversed Windows pnpm junctions and emitted “Filename too long”; it was interrupted before checks. Its selected check commands were run directly. The aggregate command is not reported as passing.Focused command:
History transfer retains the existing context budget and omission behavior. Unsupported requests can still be rejected until the runtime/configuration is compatible.
Model: GPT-6 Astra. Harness: Codex in T3 Code.