Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Claude's commands no longer run Electron apps as Node #29413

Mergedu9g(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/29413/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 5 additions and 1 deletion.

x
0 of 2 viewed, 2 left
2 additions and 1 deletionapps/server/src/provider/Drivers/ClaudeHome.test.tsModified
View file
@@ -60,7 +60,7 @@
});
​
it.effect(
- "drops the launching Claude session and labels processes t3-code unless overridden",
+ "drops the launching Claude session and Electron's run-as-Node flag, and labels processes t3-code unless overridden",
() =>
Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
@@ -72,6 +72,7 @@
CLAUDE_CODE_SESSION_ID: "host-session",
CLAUDE_CODE_MESSAGING_SOCKET: "/tmp/host-claude.sock",
CLAUDE_EFFORT: "high",
+ ELECTRON_RUN_AS_NODE: "1",
KEEP: "1",
};
const instance = [
3 additions and 0 deletionsapps/server/src/provider/Drivers/ClaudeHome.tsModified
View file
@@ -76,6 +76,9 @@
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);