Repository navigation
Allow selecting the shell used by agents on Windows #17970
Replies: 1 comment
TriageValid enhancement. Not a T3 mis-discovery bug, and not a duplicate of the integrated-terminal shell work. What happenedOn Windows, Codex agent-run commands use Windows PowerShell 5.1 even when PowerShell 7 is installed. Opening PS7 in T3’s interactive terminal does not change that. The reporter wants a provider-aware agent-shell preference (including an executable path), distinct from the integrated terminal shell, plus a way to see the effective shell and why a requested executable was ignored. DiagnosisT3 does not choose the shell Codex uses for tool commands.
export const CodexSettings = makeProviderSettingsSchema(
{
// enabled, binaryPath, homePath, shadowHomePath, launchArgs, customModels
},
{
order: ["binaryPath", "homePath", "shadowHomePath", "launchArgs"],
},
);Claude, Cursor, Grok, OpenCode, and Antigravity settings also have no agent-shell field. The integrated terminal is a separate path. On Windows it already prefers function defaultShellResolver(platform: NodeJS.Platform, env: NodeJS.ProcessEnv): string {
if (platform === "win32") {
return "pwsh.exe";
}
return env.SHELL ?? "bash";
}
// win32 candidates: requested, pwsh.exe, System32 powershell.exe, ComSpec, cmd.exeChanging the interactive terminal therefore cannot retarget agent-run commands. That matches the report. Codex itself decides the agent shell. On Windows it asks for So: T3 is missing the requested preference (enhancement). The 5.1 symptom is upstream Codex discovery, not T3 failing to find Related (do not close as duplicate)
Upstream Codex still has no shipped, documented T3-facing knob. Official config currently documents Recommended shape (if accepted)Keep this off the integrated-terminal setting.
Do not treat “reuse Workaround (this machine)T3 has no persistent agent-shell setting today.
Surfaces
Filed by Cursor Grok 4.6 via cloud issue triage. |
Uh oh!
There was an error while loading. Please reload this page.
What happened
On Windows, the Codex agent uses Windows PowerShell 5.1 even though PowerShell 7.6.5 is installed. I want to select the shell used for agent-run commands in T3 settings. Starting PowerShell 7 manually in the interactive terminal does not change the agent's shell.
Please expose a provider-aware agent-shell preference, including an executable path, where supported by the provider. Show the effective shell and explain when the provider controls it or a requested executable cannot be used.
Diagnosis
In v0.0.38, CodexSettings exposes binary path, home directories, and launch arguments, but no agent-shell setting.
The integrated terminal's shell selection tries PowerShell 7 before Windows PowerShell. That is a separate execution path and does not establish how Codex selected its shell.
Two observations may explain this machine's behavior: the user's interactive terminal cannot resolve bare
pwsh, while the triage agent can resolve the MSIX executable but receives Access denied when launching it in its sandbox. The user can launch the same absolute path successfully. The precise cause of the agent's initial shell selection remains unconfirmed.Steps to reproduce
Observed on this machine; not yet reproduced on a clean installation:
pwsh; it is not found. Run$PSVersionTable.PSVersion; it reports 5.1.Version
0.0.38 (v0.0.38; latest release at triage time).
Environment
bunx t3 triage; local T3 server running.Evidence
User's interactive terminal:
Resolved PowerShell 7 executable:
Direct launch succeeded for the user. The triage agent's sandbox returned
Access is denied.Related issues
Fix applied or workaround
The user launched PowerShell 7 directly in the interactive terminal. No persistent configuration change or additional installation was performed. This did not establish a fix for agent-run commands.
Filed by
Codex agent (GPT-6), via T3 triage.
All reactions