[PR #11956] fix(shell): Fix Windows terminal compatibility and Unix command support #14001

Closed
opened 2026-02-16 18:18:49 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11956

State: closed
Merged: No


Summary

Fixes terminal crashes on Windows when using Git bash.exe with PTY, while maintaining support for Unix commands.

Changes

packages/opencode/src/shell/shell.ts

  • Prefer native Windows shells (PowerShell/cmd.exe) for interactive PTY sessions
  • Add intelligent shell detection for command execution

packages/opencode/src/config/config.ts

  • Add terminal config option

packages/opencode/src/tool/bash.ts

  • Use Shell.forCommand() for appropriate shell per command

Testing

  • Terminal opens without crash on Windows
  • Unix commands work correctly

Related Issues

Fixes #11954

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11956 **State:** closed **Merged:** No --- ## Summary Fixes terminal crashes on Windows when using Git bash.exe with PTY, while maintaining support for Unix commands. ## Changes ### packages/opencode/src/shell/shell.ts - Prefer native Windows shells (PowerShell/cmd.exe) for interactive PTY sessions - Add intelligent shell detection for command execution ### packages/opencode/src/config/config.ts - Add terminal config option ### packages/opencode/src/tool/bash.ts - Use Shell.forCommand() for appropriate shell per command ## Testing - Terminal opens without crash on Windows - Unix commands work correctly ## Related Issues Fixes #11954
yindo added the pull-request label 2026-02-16 18:18:49 -05:00
yindo closed this issue 2026-02-16 18:18:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14001