diff --git a/src/agents/shell-utils.test.ts b/src/agents/shell-utils.test.ts index 40e745063f2..99dca3fba19 100644 --- a/src/agents/shell-utils.test.ts +++ b/src/agents/shell-utils.test.ts @@ -68,7 +68,7 @@ describe("getShellConfig", () => { process.env.PATH = ""; const { shell, args } = getShellConfig(); expect(shell).toBe("/usr/bin/fish"); - expect(args).toEqual(["-c"]); + expect(args).toEqual(["--no-config", "-c"]); }); it("uses zsh no-rc mode to avoid startup-file env overrides", () => { diff --git a/src/agents/shell-utils.ts b/src/agents/shell-utils.ts index f9be1b368c0..e23a2bf600d 100644 --- a/src/agents/shell-utils.ts +++ b/src/agents/shell-utils.ts @@ -50,6 +50,9 @@ function resolvePosixShellArgs(shellPath: string): string[] { if (shellName === "bash") { return ["--noprofile", "--norc", "-c"]; } + if (shellName === "fish") { + return ["--no-config", "-c"]; + } return ["-c"]; }