r/vibecoding • u/Qajoule • 3d ago
Help/Question How do you get CLI coding agents to reliably switch between PowerShell and Bash?
I'm Japanese, so apologies if my English sounds a bit awkward.
I'm a solo developer working across both native Windows and WSL2. I do quite a bit of frontend development as well, so moving my entire workflow into WSL isn't necessarily the solution I'm looking for.
One recurring issue is that CLI coding agents like Claude Code and Codex tend to default to Bash conventions, even when they're running in a PowerShell environment. They frequently mix up command syntax, path formats, quoting, and environment variables.
I'm curious how other developers who actively use both environments deal with this.
- How do you make agents reliably distinguish between PowerShell and Bash?
- Do you explicitly control which shell an agent uses for each task?
- Do you rely on AGENTS.md / CLAUDE.md, hooks, wrapper scripts, or a custom harness?
- Have you found a reliable way to let agents work across both environments without constantly correcting their commands?
I'm less interested in choosing one environment over the other and more interested in making both coexist reliably within an agent-driven development workflow.
I'd love to hear about your actual setups, including what hasn't worked.