The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 09:45 UTC
fix(pi): health checks no longer run Pi extensions in the server's folder (#37654)
Julius Marminge committed
Nov 16, 2026 at 06:19 UTC
222288b00f9ed392e1e7352ad929c9ae9ac10cef
2 files changed
+17
-8
packages/provider-pi/src/server/driver.test.ts
+7
-3
@@ -75,7 +75,7 @@ const makePiSpawner = Effect.fnUntraced(function* (
75
? {
76
commands: [
77
personalSkill,
78
- ...(cwd === "/machine"
78
+ ...(cwd?.endsWith("/pi-status-probe")
79
? []
80
: [
81
{
@@ -171,9 +171,13 @@ it.layer(layerTest)("PiDriver workspace discovery", (it) => {
171
assert.equal(workspaceLaunch!.options.env?.PI_CODING_AGENT_DIR, "/isolated-pi");
172
// Discovery processes are stopped as soon as they answer, so neither may start Pi's
173
// network refresh at launch.
174
- for (const cwd of ["/machine", "/first"]) {
174
+ assert.isFalse(launches.some((launch) => launch.options.cwd === "/machine"));
175
+ for (const isLaunch of [
176
+ (cwd: string | undefined) => cwd?.endsWith("/pi-status-probe") === true,
177
+ (cwd: string | undefined) => cwd === "/first",
178
+ ]) {
179
const discovery = launches.find(
176
- (launch) => launch.options.cwd === cwd && launch.args.includes("--mode"),
180
+ (launch) => isLaunch(launch.options.cwd) && launch.args.includes("--mode"),
181
);
182
assert.deepEqual(
183
discovery?.args.filter((arg) => arg === "--offline"),
packages/provider-pi/src/server/driver.ts
+10
-5
@@ -97,7 +97,8 @@ export const PiDriver: ProviderDriver<PiSettings, PiDriverEnv, Path.Path> = {
97
const httpClient = yield* HttpClient.HttpClient;
98
const latestVersions = yield* ProviderLatestVersions.ProviderLatestVersions;
99
const host = yield* ProviderHost.ProviderHost;
100
- const { cwd } = host.paths;
100
+ // Pi runs extensions' session_start in its cwd; the server's cwd is $HOME on packaged desktop.
101
+ const probeCwd = pathService.join(host.paths.providerStatusCacheDir, "pi-status-probe");
102
const processEnv = yield* mergeProviderInstanceEnvironment(environment);
103
const continuationIdentity = defaultProviderContinuationIdentity({
104
driverKind: DRIVER_KIND,
@@ -141,10 +142,14 @@ export const PiDriver: ProviderDriver<PiSettings, PiDriverEnv, Path.Path> = {
142
);
143
const textGeneration = yield* makePiTextGeneration(effectiveConfig, processEnv);
144
144
- const checkProvider = checkPiProviderStatus(effectiveConfig, processEnv, cwd).pipe(
145
- Effect.map(stampIdentity),
146
- Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
147
- );
145
+ const checkProvider = fileSystem
146
+ .makeDirectory(probeCwd, { recursive: true })
147
+ .pipe(
148
+ Effect.ignore,
149
+ Effect.andThen(checkPiProviderStatus(effectiveConfig, processEnv, probeCwd)),
150
+ Effect.map(stampIdentity),
151
+ Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
152
+ );
153
154
const snapshotSettings = yield* makeProviderSnapshotSettingsSource(effectiveConfig);
155
const snapshot = yield* makeManagedServerProvider<ProviderSnapshotSettings<PiSettings>>({