Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): agent shells no longer inherit ELECTRON_RUN_AS_NODE #35447

Openjuliusmarmingewants to merge 3 commits intomain fromrefs/pull/35447/headopened View on GitHub

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

x
0 of 5 viewed, 5 left
0 additions and 3 deletionsapps/server/src/provider/Drivers/ClaudeHome.tsModified
View file
@@ -76,9 +76,6 @@
CLAUDE_CODE_ENTRYPOINT: "t3-code",
};
for (const name of CLAUDE_HOST_SESSION_VARIABLES) delete baseEnvironment[name];
- // The desktop runs the server as Node through Electron. Commands Claude runs inherit its env, so
- // an Electron app they start (T3 Code itself, VS Code) would run as Node and exit.
- delete baseEnvironment.ELECTRON_RUN_AS_NODE;
const environment = yield* mergeProviderInstanceEnvironment(instanceEnvironment, baseEnvironment);
const settingsEntrypoint = (yield* readClaudeSettingsEnv(config, undefined, environment))
.CLAUDE_CODE_ENTRYPOINT;
36 additions and 7 deletionsapps/server/src/provider/CodexManagedRuntime.test.tsModified
View file
@@ -29,13 +29,17 @@
const decodeCommand = Schema.decodeUnknownSync(
Schema.fromJsonString(Schema.Tuple([Schema.String, Schema.Array(Schema.String)])),
);
-it.live.each(
- (["managed", "local"] as const).flatMap((source) =>
- (["primary", "additional"] as const).map((account) => ({ source, account })),
+it.live.each([
+ ...(["managed", "local"] as const).flatMap((source) =>
+ (["primary", "additional"] as const).map((account) => ({ source, account, host: "Node" })),
),
-)(
- "$source Codex $account account shares home state without routing owned tokens through ambient CLI overrides",
- ({ source, account }) =>
+ // The desktop runs the server on its Electron binary as Node; Codex's env has that mode removed.
+ ...(HostProcess.Platform.defaultValue() === "win32"