Skip to content

fix(web): resume imported custom-provider threads - #10184

Merged
juliusmarminge merged 1 commit into
mainfrom
fix/imported-custom-instance-lock
Sep 5, 2026
Merged

fix(web): resume imported custom-provider threads#10184
juliusmarminge merged 1 commit into
mainfrom
fix/imported-custom-instance-lock

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 5, 2026

Copy link
Copy Markdown
Member

Imported Claude and Codex histories could show no available provider when they belonged to a custom provider instance. Before their first GUI prompt they have no projected session, and the composer mistook the instance ID for a driver name.

Resolve that instance through the thread environment's provider catalog before locking the composer. Existing session identity stays authoritative. Missing or disabled instances remain unavailable; this does not enable cross-provider switching.

The production importer/decider/projector reproduces the no-session trigger for custom Claude and Codex, with built-in instances and a session-bind control. Three new desired-selection regressions fail on main. All 145 focused tests pass on the fix, including an independent rerun. Targeted lint, formatting and diff checks pass. Local web typecheck reports the same unrelated fileEditorVirtualization.test.ts argument-count error on clean main and this candidate.

In the actual Chromium 152 client, the same synthetic imported history changes from an unavailable-provider composer to the correct Claude model picker. The environment is connected and the custom instance is ready in both captures; the thread has two messages and no session. The picker opens normally after the fix, and empty Send remains disabled. No provider turn or real account was used. This visual fixture is separate from the production import regression test.

Verified against cb9a6942, with relevant paths unchanged on current main 4ca71463. Desktop shares this web renderer. Mobile already resolves the exact instance separately and is unchanged; no native verification is claimed.

The broader provider-switching proposal #9392 touches this helper but makes a different policy change. This fix preserves the current lock policy.

Before:

Before: imported custom-provider history has an unavailable-provider composer despite a connected environment

After:

After: the same imported history has its Claude Sonnet model picker and normal composer

Prepared by GPT 6 Astra via Codex in T3 Code.

Note

Fix imported custom-provider thread resume selection in resolveComposerProviderSelection

  • Adds test coverage for resuming imported threads that use a custom provider instance, verifying the composer can still select that instance before a session is created
  • Covers session-authority precedence (session driver wins over thread model instance and current draft selection), unavailable/disabled imported instances (lock retained, no substitution), and new unstarted drafts (remain unlocked)
  • Adds an importedThread fixture helper that creates a started thread with a selected provider instance and an imported-history user message without a session

Macroscope summarized dbaabec.

Resolve imported thread instance IDs through the environment provider catalog before locking the composer to a driver. Keep an existing session authoritative and preserve unavailable instance locks.

Prepared with GPT 6 Astra using the Codex harness.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 5, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at dbaabec

Macroscope's review found this PR approvable — This is a small, localized web bug fix that preserves provider/session identity when resuming imported custom-provider threads. Runtime changes are confined to composer provider resolution and are accompanied by targeted tests for custom, missing, disabled, and session-backed instances.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.6 KiB +70 B (+0.5%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB +5 B (+0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.6 KiB +65 B (+1.0%) 7.8 KiB
Codex Live turn WebSocket decoded 57.0 KiB 57.1 KiB +88 B (+0.2%) 66.4 KiB
Codex Live turn messages 8 10 +2 (+25.0%) 21
Claude Total thread wire 13.5 KiB 13.6 KiB +47 B (+0.3%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB +3 B (+0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB +44 B (+0.7%) 7.8 KiB
Claude Live turn WebSocket decoded 57.8 KiB 57.9 KiB +88 B (+0.1%) 66.4 KiB
Claude Live turn messages 8 10 +2 (+25.0%) 21

Baseline: 4ca7146 · PR result: dbaabec · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge
juliusmarminge merged commit d92dca7 into main Sep 5, 2026
23 checks passed
@juliusmarminge
juliusmarminge deleted the fix/imported-custom-instance-lock branch September 5, 2026 19:10
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 5, 2026
## What's Changed
* fix(web): align tool disclosure chevrons with expanded state by @maria-rcks in pingdotgg/t3code#9935
* fix(antigravity): distinguish session initialization auth failures by @maria-rcks in pingdotgg/t3code#9919
* fix(cursor): cache successful model discovery between refreshes by @maria-rcks in pingdotgg/t3code#9918
* fix(opencode): revert from the first removed assistant message by @maria-rcks in pingdotgg/t3code#9924
* fix(web): resume imported custom-provider threads by @juliusmarminge in pingdotgg/t3code#10184
* test(web): cancel pending highlight fixture frames during cleanup by @juliusmarminge in pingdotgg/t3code#10188


**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260905.1289...v0.0.39-nightly.20260905.1290

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260905.1290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant