Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/server/src/provider/Drivers/ClaudeHome.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ it.layer(NodeServices.layer)("ClaudeHome", (it) => {
});

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;
Expand All @@ -72,6 +72,7 @@ it.layer(NodeServices.layer)("ClaudeHome", (it) => {
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 = [
Expand Down
3 changes: 3 additions & 0 deletions apps/server/src/provider/Drivers/ClaudeHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export const mergeClaudeProcessEnvironment = Effect.fn("mergeClaudeProcessEnviro
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;
Expand Down
Loading