Skip to content

feat(runtime): support explicit Git Bash selection on Windows - #2684

Merged
Astro-Han merged 12 commits into
apache:mainfrom
me2seeks:feat/2195-git-bash-shell
Aug 19, 2026
Merged

Astro-Han merged 12 commits into
apache:mainfrom
me2seeks:feat/2195-git-bash-shell

Conversation

@me2seeks

@me2seeks me2seeks commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a Host-owned auto / git_bash shell preference while keeping the existing PowerShell-first Windows detection unchanged by default
  • validate an explicit bash.exe on the Runtime Host before persisting it, then use the resolved ShellPlan for Bash tools, child agents, background and PTY execution, the integrated terminal, and model-facing shell guidance
  • add the Desktop setting and preserve older Runtime Policy documents through the schema migration; the legacy System32\bash.exe WSL shim uses stdin for non-PTY commands

The executable path is intentionally resolved on the Runtime Host, not the Desktop Client. This keeps remote Desktop connections honest and makes an invalid or later-missing explicit path fail closed instead of silently returning to PowerShell.

Fixes #2195

Desktop

Git Bash setting in Desktop

Verification

  • npm run build:test
  • npm run test:dist:serial — all workspace tests passed
  • npm run typecheck
  • npx biome check .
  • git diff --check
  • rendered and inspected Product/Settings/Pages/General Git Bash in Storybook at 1440×1000

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
中文对照

概要

  • 增加由 Runtime Host 持有的 auto / git_bash shell 偏好;默认仍保持现有的 Windows PowerShell 优先检测
  • 显式选择时,由 Runtime Host 在持久化前验证 bash.exe,并将解析出的同一个 ShellPlan 用于 Bash 工具、子 Agent、后台与 PTY 执行、集成终端以及面向模型的 shell 方言说明
  • 增加 Desktop 设置,并通过 schema 迁移兼容旧 Runtime Policy 文档;旧版 System32\bash.exe WSL shim 的非 PTY 命令通过 stdin 输入

可执行文件路径刻意在 Runtime Host 而不是 Desktop Client 上解析。这样远程 Desktop 连接不会误用客户端机器的路径;显式路径无效或之后消失时也会失败关闭,而不会静默回退到 PowerShell。

AI use

  • No generative tool was used for implementation.
  • Generative tooling was used and the result was reviewed and verified by the author.

Tool(s) and scope: OpenAI Codex (Maka) assisted with the original implementation, tests, and review remediation. OpenAI Codex handled the current-main rebase, compatibility-epoch conflict resolution, and final local verification.

Final squash trailers:

Generated-by: Maka
Generated-by: Codex

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow users to explicitly select Git Bash as the Bash tool shell on Windows

2 participants