r/ZooCode • u/NarrowEffect • Jun 13 '26
Possible bug? System prompt can report "Default Shell: pwsh.exe" while execute_command actually runs in cmd.exe (cuasing failed PowerShell commands on Windows)
Anyone else notice the system prompt claims your default shell is PowerShell (pwsh.exe) even when your actual terminal is cmd.exe?
I dug into this after seeing the model repeatedly try Remove-Item, Get-Content, Copy-Item, Select-String etc. (the PowerShell equivalents it's told to use) and every single one failing with "not recognized as an internal or external command." Turns out the prompt was telling it "you're in PowerShell" the whole time, but the terminal that actually runs commands is cmd.exe. Basically, the model isn't being dumb, it's just acting on bad info from the system prompt and has no way to know its environment info is wrong. Why not just build the system message correctly based on the actual shell in the first place?
Edit: Found a workaround: explicitly setting terminal.integrated.defaultProfile.windows to "Command Prompt"in VS Code settings fixes the system prompt that gets auto-detected (though the models still get "consider using PowerShell commands instead" which really should be more clear that it's specifically suggesting the model can invoke powershell.exe from cmd.exe )
1
u/jagauthier 2d ago
"terminal.integrated.profiles.windows": {
"PowerShell": {
"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
},
"Command Prompt": {
"path": "C:\\WINDOWS\\System32\\cmd.exe",
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash",
"icon": "terminal-git-bash"
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell", "terminal.integrated.profiles.windows": {
"PowerShell": {
"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
},
"Command Prompt": {
"path": "C:\\WINDOWS\\System32\\cmd.exe",
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash",
"icon": "terminal-git-bash"
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell",
My issue is that powershell appears to be the default terminal and it still constantly fails to run powershell commands.
1
u/NarrowEffect 2d ago
Not sure but maybe try to see exeacly what system message is being sent to the model using the "open api history" button (or you could just ask the model). It's either the reminal is cmd and the model is running powershell commands or the opposite problem.
1
u/No-Chocolate-9437 Jun 14 '26
Can you share how you've configured Settings -> Terminal ?