Skip to content

fix(providers): keep in-flight work running when a provider is renamed - #88

Open
macodev00 wants to merge 1 commit into
mainfrom
cursor/provider-rename-inflight-v2
Open

macodev00 wants to merge 1 commit into
mainfrom
cursor/provider-rename-inflight-v2

Conversation

@macodev00

@macodev00 macodev00 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Problem

Renaming a provider, or changing only its accent color, rebuilt that provider instance and closed its scope. Every in-flight thread on the instance stopped. The first rename of a default provider did the same thing, because it also lifts a legacy config.enabled flag out of the driver blob and onto the envelope. Deleting a provider with a running thread had no confirmation.

Change

A display-name or accent-color edit updates the live instance in place. Its scope and in-flight fiber keep running, and later snapshot reads use the new presentation. Lifting config.enabled onto the envelope counts as the same runtime config when the resolved enabled value does not change. Deleting the instance or changing runtime settings still closes the scope.

In Settings, delete asks with the existing confirm dialog only when that instance has an in-flight orchestration v2 thread. Cancel leaves the turn running. An idle provider still deletes immediately.

Scope and approval

Maintainer-triaged bug: pingdotgg/t3code#11043 (labels bug, accepted). The triage comment asks to keep the instance for presentation-only edits, warn before a delete that would stop active threads, and cover the display-name reconcile with a registry test. This PR does that. Environment-variable edits still rebuild the instance; that broader request in the issue is out of scope.

Verification

Head d910d878f4d22e6a4d4593ba6e3a5b44a50588b7.

  • vp test run src/settings.test.ts in packages/contracts: 1 file, 159 tests passed.
  • vp test run src/provider/Layers/ProviderInstanceRegistryLive.presentation.test.ts in apps/server: 1 file, 2 tests passed.
  • vp test run src/provider/Layers/ProviderInstanceRegistryLive.test.ts in apps/server: 1 file, 8 tests passed.
  • vp test run src/components/settings/ProviderSettingsPanel.environment.test.tsx in apps/web: 1 file, 19 tests passed.
  • tsc --noEmit in packages/contracts: exit 0, no errors.
  • tsc --noEmit in apps/web: exit 0, no errors.
  • tsc --noEmit in apps/server: exit 0. The compiler printed existing effect suggestions elsewhere in the package and no errors in the files changed here.

Manual check: open Settings, rename or recolor a provider while one of its threads is still working, and confirm the turn keeps running under the new label. Delete that provider while the turn is in flight and confirm the dialog; Cancel should leave the turn running. Delete an idle extra provider and it should disappear immediately, with no dialog. Changing a runtime setting such as an environment variable should still stop that instance's live sessions.

Limitations: no provider CLI or account is available in this environment, so a genuinely in-flight turn could not be started and the Settings interaction was not captured in a browser. Desktop wraps the web Settings panel. Mobile has no provider-delete control. Native shells and real provider binaries were not exercised.

UI Changes

UNCAPTURABLE: this environment has no Codex, Claude, Cursor, Grok, or OpenCode CLI and no provider API key, so there is no honest way to start a long-running turn. A seeded "running" shell would not be an in-flight turn, and the before/after evidence has to show that rename stopping or preserving that turn. No screenshots were uploaded.

The user-visible change is on the web Settings provider page (desktop uses the same page). Rename and accent color save without tearing the instance down. Delete shows the existing confirm dialog only when that instance owns an in-flight orchestration v2 thread (preparing, queued, starting, running, or waiting, with activity status winning). The dialog says the delete stops that provider's running threads and keeps history. Cancel leaves the turn running. Idle delete stays immediate.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes

Implemented with Grok 4.7 in Cursor.

Open in Web Open in Cursor 

A display name or accent color edit rebuilt the provider instance and
closed its scope, which stopped every thread using it. Update presentation
in place, including the first rename that only lifts a legacy config.enabled
flag, and ask before deleting a provider that still has an in-flight thread.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 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