GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): recover Codex sessions after sharing rejection by yelgabo · Pull Request #28962 · pingdotgg/t3code

Conversation

@yelgabo

@yelgabo yelgabo commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

A Codex turn rejected by ChatGPT sharing can leave its native conversation unable to answer any later prompt, including huh. Native thread/resume succeeds, so T3 keeps reusing history that the provider rejects.

On the next user turn, recognize the persisted subscription_sharing_unsupported_capability failure 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=false and features.multi_agent_v2=false, but native agents still ran. Closed/unmerged #20270 proposes adding agents.enabled=false to prevent that mismatch. There is no verified enable=true workaround 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.

  1. In a disposable thread, request no tools and exactly BASELINE_OK: succeeds.
  2. Request exactly one native collaboration.spawn_agent, whose worker replies WORKER_OK without tools, followed by collaboration.wait_agent.
  3. Worker and parent fail with invalid_request_error, param=input, code=subscription_sharing_unsupported_capability, willRetry=false.
  4. Send literal 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_message records 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.

  • Against base 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.
  • Separate real-provider validation copied the broken rollout into an isolated CODEX_HOME: resuming it and sending huh still failed. A replacement native session carrying the conversation as text correctly recalled BASELINE_OK, then answered FOLLOWUP_OK in that same session. No live install/state was patched. This checks the recovery mechanism, not a deployed T3 UI end-to-end.
  • Selected test files: 88 passed, 4 failed. All four worktree-recreation failures reproduce unchanged against base. Full failure names and outputs are in the evidence.
  • Changed-file format/lint, server GraphQL generation, typechecks for t3, @t3tools/evals, and @t3tools/scripts, and both knip:check passes succeeded.
  • vp run check:changed was 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:

vp test run apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts -t "recovers rejected Codex history"

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 1, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 2, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 332447e

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

  • Last reviewed commit: 29b7322
  • Latest commit, not reviewed: 2bf29c2

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Codex startup detects eligible rejected native history from prior accepted runs. If background work is pending, startup fails. Otherwise, it uses fresh-session recovery with portable context. Integration tests cover recovery and exclusion cases.

Changes: Codex rejected-history recovery

Layer / File(s) Summary
Detect rejected history and route startup
apps/server/src/orchestration-v2/ProviderTurnStartService.ts
Startup checks prior accepted-run history for the rejected-history error. It excludes mismatched native threads and runs covered by a full-thread-summary handoff. Pending background work causes ContextHandoffBackgroundWorkError. Otherwise, rejected history triggers fresh-session recovery with a distinct reason.
Exercise recovery and exclusion cases
apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts, apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts
The test adapter tracks native threads with rejected runs. Integration scenarios cover recovery, repaired-native reuse, other errors, other providers, and pending background work. Tests also check that follow-up turns reuse the recovery thread without reinjecting history. The history fixture returns empty history when no fallback read failure is configured.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: yash-singh1, juliusmarminge, maria-rcks

Merge Risk: Minimal · previous review 29b73

Codex sessions rejected for sharing now recover on the next user turn through the existing fresh-session fallback. No concrete merge-blocking defect was established. One unconfirmed edge case remains: whether native background work could survive a reopened runtime and so go undetected before the thread is replaced.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(server): recover Codex sessions after sharing rejection" names the main change: recovery of Codex sessions whose persisted history was rejected for subscription sharing. The raw summary…
Description check Passed The description follows the template's main sections: Problem (rejected Codex history blocks later prompts), Change (recovery via existing fresh-session/portable-history fallback, with scope limits), …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(server): recover Codex sessions after sharing rejection" names the main change: recovery of Codex sessions whose persisted history was rejected for subscription sharing. The raw summary confirms the change in ProviderTurnStartService (rejected-history detection, fresh-session recovery with rejected_native_history) and the integration test matrix. The title is a conventional commit in plain language and is specific enough for a teammate scanning history. It omits the background-work wait and the test additions, which is acceptable.

Full details: Description check

Explanation

The description follows the template's main sections: Problem (rejected Codex history blocks later prompts), Change (recovery via existing fresh-session/portable-history fallback, with scope limits), Scope (references related #21061 and calls it a focused reliability fix, though it does not link a specific bug issue or say a maintainer requested it), and Verification (detailed focused command, before/after results, the 88 passed / 4 failed test counts, and an unreported check:changed run). It names the model and harness at the end as the template asks. The Scope section is weaker because it does not clearly link the issue that shows the bug, and the author describes #21061 only as related. This is a minor gap, so the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 4adb946
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d84b1910-e1e8-4cf8-9adb-b40d9d90c4b6
Commits

Reviewing files that changed from the base of the PR and between 10f1d85 and 29b7322.

Files selected for processing: 3

  • apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts
  • apps/server/src/orchestration-v2/ProviderTurnStartService.ts
  • apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yelgabo yelgabo mentioned this pull request Nov 2, 2026
fix(server): use native paths in real filesystem startup tests #28997
Open
@yelgabo
fix(server): recover Codex sessions after sharing rejection
471b4c2
@yelgabo
yelgabo force-pushed the fix/codex-invalid-history-recovery branch from 332447e to 471b4c2 Compare November 4, 2026 22:42
@yniknafs
fix(server): retain sharing recovery after run interruption
10c8d12
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.
@yniknafs yniknafs mentioned this pull request Nov 7, 2026
fix(server): retain sharing recovery after run interruption yelgabo/t3code#1
Merged
@yniknafs

yniknafs commented Nov 7, 2026

Copy link
Copy Markdown

Sent a small follow-up to your existing branch: yelgabo#1 (head 10c8d12c9faa13ee3d6c6506da9198039f43f784). It recognizes interrupted/cancelled accepted runs only when the same exact root sharing-rejection item was already persisted; native-ID and background-work guards stay intact. Ordinary Stop without that retained root error is unchanged. The two added tests synthesize persisted terminal states, not a live cancellation race. All nine rejected-history scenarios and check:changed (100 tests, pinned Node 26.12.1) pass. This is a 22-line supplemental amendment, not a replacement PR or a prevention/instruction/provider-switching change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RileySpiller RileySpiller mentioned this pull request Nov 9, 2026
[Bug]: Connect with ChatGPT still rejects Codex sub-agents (forked sub-agent) and the thread can't continue (0.1.6) #29992
Closed
2 tasks done
yelgabo added 2 commits November 10, 2026 13:25
@yelgabo
Merge pull request #1 from yniknafs/fix/sharing-rejected-terminal-sta…
a342e91
…tes-20261106

fix(server): retain sharing recovery after run interruption
@yelgabo
fix(server): merge main preserving rejected-history and cancellation …
10f1d85
…tests
@yelgabo

yelgabo commented Nov 10, 2026

Copy link
Copy Markdown
Author

Resolved the test-helper conflict by merging upstream main 44ebb2fe57465d32f2bd07c5eb3d8e871bdf5ed5 into this branch (head 10f1d8514616fb9c1b7ed891fdf056b2211acd7e). Preserved both rejected-native-history tracking and upstream cancelledRunOrdinals handling, including failure/interruption/cancellation precedence. Production recovery logic is unchanged apart from the automatic upstream merge. No lockfile or unrelated changes remain in the PR diff.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 10, 2026
fix(server): ACP agents keep the kept conversation after Edit from here #30188
Merged
fix(server): native session replacement fails honestly when the provider reuses its session #27517
Merged
@dotspace42 dotspace42 mentioned this pull request Nov 13, 2026
fix(codex): prevent catalog agents in ChatGPT sharing #28143
Closed
@dotspace42

dotspace42 commented Nov 13, 2026

Copy link
Copy Markdown

Additional Linux verification of the recovery change.

Applied this PR’s production diff unchanged from 10f1d8514616 to main 5ccc65be0a2b. The integration test file conflicted in the adapter helper and adjacent test additions; a temporary resolution preserved upstream behavior/tests plus this PR’s rejected-history tracking and scenarios. The published branch was not changed.

Failing-first proof

vp test run apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts -t "recovers rejected Codex history" --maxWorkers=2

Without the production recovery change:

  • Failed: live, detached, legacy, interrupted, cancelled, and background.
  • Passed: other-error, other-provider, and repaired-native.

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 check

The 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 validation

With #28143 also applied, the complete two relevant test files passed 71 tests.

vp run --filter t3 typecheck

Server-only typechecking passed with Node 26.12.1, emitting existing Effect suggestions. git diff HEAD --check passed.

check:changed, repo-wide checks, and patched desktop-UI end-to-end testing were not run; no CI result is claimed.

Investigation assisted by GPT-6.1 Sol through Codex in T3 Code.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 14, 2026
@xiangyingchang xiangyingchang mentioned this pull request Nov 14, 2026
fix(server): recover Codex threads after encrypted history rejection #36643
Merged
maria-rcks added 2 commits November 15, 2026 02:24
@maria-rcks
chore: merge main into codex history recovery
a042ab2
@maria-rcks
fix(server): preserve ownership checks during history recovery
29b7322
@maria-rcks

maria-rcks commented Nov 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

merged current main (eebb6bccdf83) without rebasing and pushed 2bf29c2071ca96b5292a9926659cdab3bfc8e2fa to the existing contributor branch. resolved both conflicts while preserving rejected-history recovery, main's imported-native-session handling and rollback recovery, and both groups of integration cases. native ownership and background-work guards remain intact. the pr still changes only the same three files (327 additions, 15 deletions).

blacksmith vp run check:changed github/main passed: formatting, lint, both knip checks, graphql, affected typechecks (3 packages), and all 170 tests across 3 files. two independent read-only reviews approved this head with no findings. no unresolved review threads or actionable bot findings were present. github reports this head mergeable; new ci is pending.

live sharing-rejection recovery was not reproduced in this run. the separate real-account cli verification reported below remains contributor evidence, not a check i reran. no ui changes were made.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 15, 2026
@github-actions

github-actions Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 17, 2026
@maria-rcks

maria-rcks commented Nov 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

the recovery path remains unverified. this vm's local codex proxy accepted the native-agent history on both main and this pr, so the original sharing rejection could not be reproduced. no source changes or pushes were made.

Verified in a real dev environment

  • checked github/main at b648395fa5afe9b017252436f7328c58b787d56e in a separate worktree, then the exact pr head 29b7322ce2f63fbb0955ae4fc09b7ff69ea22156. ran vp i in both. one background dev server ran at a time, with separate .t3 state.
  • used repo playwright with /usr/bin/google-chrome. added a real git project through the web client and submitted actual codex gpt-6.1-sol turns. no mocks, fixtures, or imported rollouts.
  • on both heads: BASELINE_OK, one native spawn/wait returning WORKER_OK and PARENT_OK, then literal huh all completed. main retained one native session across all three turns.
  • on the pr: stopped a real running timeout 45 sleep 30 command with the stop control. the app showed Run interrupted, and the next turn returned BASELINE_OK FOLLOWUP_OK. read-only projection inspection confirmed all five turns retained the same native session, selected provider/model, and zero handoffs.
  • blacksmith: all 151 tests passed across ProviderSwitch.integration.test.ts and ProviderTurnStartService.test.ts, including the nine rejected-history cases. these deterministic adapter tests do not establish live sharing recovery.

main after native delegation and huh:

main accepts native-agent history and answers huh

pr after interruption and context-preserving follow-up:

pr preserves the original marker after an ordinary interruption

27-second animated recording: three chronological excerpts of stop, follow-up submission, and response. gaps are omitted; playback speed is unchanged.

pr stop and follow-up interaction excerpts

sanitized runtime transcript

Not verified

  • live subscription_sharing_unsupported_capability recovery, native-session replacement, portable-history delivery, and its pending-background-work/ownership guards. neither checkout produced the required rejection; observed transient failures were transport errors that recovered. successful normal turns cannot prove the changed branch.
  • native desktop/mobile clients and macos/windows behavior were not exercised on this linux vm.

full check:changed was not rerun because this verification made no source changes. existing github ci is green; it does not resolve the live-recovery gap.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dotspace42

dotspace42 commented Nov 18, 2026

Copy link
Copy Markdown

I verified automatic recovery through the T3 CLI with a real Connect with ChatGPT login (openai_token_sharing): Ubuntu 26.04.1, T3 0.1.10, Codex 0.166.0, gpt-6.1-sol.

On stock 0.1.10, a native collaboration.spawn_agent call with fork_turns="none" failed with subscription_sharing_unsupported_capability. A plain follow-up asking for an earlier marker failed with the same error, even after starting an unpatched 0.1.10 server with the same state.

With only this PR (29b7322c) applied to 0.1.10, the identical prompt in the same T3 thread returned the exact marker. The server records show one full_thread_summary handoff to a replacement Codex conversation. The next turn reused that conversation without another handoff, and the failed spawn wasn’t retried.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks
chore: merge main into codex history recovery
2bf29c2
@aviadr1 aviadr1 mentioned this pull request Nov 19, 2026
[Bug]: ChatGPT sharing: Codex is still offered spawn_agent (agents.enabled not disabled), and one spawn permanently poisons the thread (0.1.10) #39101
Open
2 tasks done
@juliusmarminge juliusmarminge mentioned this pull request Nov 19, 2026
fix(server): ChatGPT sharing no longer offers Codex native sub-agents #39102
Merged
@github-actions

github-actions Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Closing: this PR still conflicts with main and has had no activity for 7 days since the rebase request.

To continue, rebase the branch and open a new PR that links this one. See the conflict window.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Nov 27, 2026
@github-actions github-actions Bot removed the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@yelgabo @yniknafs @dotspace42 @maria-rcks
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.