Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): launched threads step down to a runtime mode their provider offers #26682

Mergedhenrychu04(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/26682/headmerged by maria-rcks View on GitHub

Showing 5 changed files with 69 additions and 2 deletions (loading 2).

x
0 of 5 viewed, 5 left
56 additions and 0 deletionsapps/server/src/mcp/toolkits/project/handlers.test.tsModified
View file
@@ -243,6 +243,62 @@
}),
​
+it.effect("a launch steps an inherited mode down to the provider's, and refuses one it lacks", () =>
+ Effect.gen(function* () {
+ // Pi offers no Auto; a mode a provider lacks would run as Supervised.
+ const pi = ProviderInstanceId.make("pi");
+ const launchPi = Effect.fn("test.launchPi")(function* (runtimeMode?: RuntimeMode) {
+ const launched: Array<ThreadLaunch.ThreadLaunchInput> = [];
+ const { projectId, dependencies } = clientLaunchHarness({
+ runtimeModeCeiling: "auto",
+ launched,
+ providers: [
+ {
+ instanceId: pi,
+ driver: ProviderDriverKind.make("pi"),
+ enabled: true,
+ installed: true,
+ status: "ready",
+ version: null,
+ auth: { status: "authenticated" },
+ checkedAt: "2026-01-01T00:00:00Z",
+ models: [],
+ slashCommands: [],
+ skills: [],
+ supportedRuntimeModes: ["approval-required", "auto-accept-edits", "full-access"],
+ },
+ ],
+ });