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 22, 02:00 UTC
fix(server): macOS Bash terminals now start as login shells (#22295)
Co-authored-by: maria-rcks <maria@kuuro.net>
fixfon committed
Nov 9, 2026 at 00:46 UTC
f92daf1fcfba55d9aed5a0fde46a6c99b432b491
2 files changed
+23
apps/server/src/terminal/Manager.test.ts
+19
@@ -2064,6 +2064,25 @@ it.layer(
2064
}),
2065
);
2066
2067
+ it.effect("starts bash as a login shell on macOS only", () =>
2068
+ Effect.gen(function* () {
2069
+ for (const [platform, shell, args] of [
2070
+ ["darwin", "/bin/bash", ["-l"]],
2071
+ ["darwin", "/opt/homebrew/bin/bash", ["-l"]],
2072
+ ["linux", "/bin/bash", undefined],
2073
+ ["win32", "C:\\Program Files\\Git\\bin\\bash.exe", undefined],
2074
+ ["darwin", "/bin/zsh", ["-o", "nopromptsp"]],
2075
+ ["linux", "/bin/zsh", ["-o", "nopromptsp"]],
2076
+ ["win32", "pwsh.exe", ["-NoLogo"]],
2077
+ ] as const) {
2078
+ const { manager, ptyAdapter } = yield* createManager(5, {
2079
+ shellResolver: () => shell,
2080
+ }).pipe(Effect.provide(layerWithHostPlatform(platform)));
2081
+ yield* manager.open(openInput());
2082
+ expect.soft(ptyAdapter.spawnInputs[0]?.args, `${platform} ${shell}`).toEqual(args);
2083
+ }
2084
+ }),
2085
+ );
2086
it.effect("removes terminal metadata subscriptions when initial delivery fails", () =>
2087
Effect.gen(function* () {
2088
const { manager } = yield* createManager();
apps/server/src/terminal/Manager.ts
+4
@@ -566,6 +566,10 @@ function shellCandidateFromCommand(
566
if (platform !== "win32" && shellName === "zsh") {
567
return { shell: command, args: ["-o", "nopromptsp"] };
568
}
569
+ // Login shells load ~/.bash_profile, matching macOS terminal startup.
570
+ if (platform === "darwin" && shellName === "bash") {
571
+ return { shell: command, args: ["-l"] };
572
+ }
573
return { shell: command };
574
}
575