Skip to content

refactor: drop the Windows PowerShell launcher in favor of Git Bash#186

Open
lucianlamp wants to merge 1 commit into
fujibee:mainfrom
lucianlamp:upstream/pr3-drop-powershell-launcher
Open

refactor: drop the Windows PowerShell launcher in favor of Git Bash#186
lucianlamp wants to merge 1 commit into
fujibee:mainfrom
lucianlamp:upstream/pr3-drop-powershell-launcher

Conversation

@lucianlamp

Copy link
Copy Markdown
Contributor

Summary

  • remove the Windows PowerShell launcher/profile installer and the PowerShell smoke tests
  • keep Windows support on the Bash/Git Bash path: dispatcher, delivery commandWindows wrapping, and legacy helper cleanup
  • update the Windows docs to make Git Bash the explicit execution path for agmsg scripts

Why

agmsg is implemented as Bash scripts. On Windows, Claude Code naturally works with Bash/Git Bash for these calls, but native Windows Codex commands and hooks often start from PowerShell. PowerShell cannot execute bare .sh files, and a bare bash can resolve to the WSL shim (WindowsApps\bash.exe), which uses a separate $HOME and can create or read a different SQLite database.

This keeps the Windows story best-effort but less ambiguous: run agmsg through Git Bash, and tell users to pin Git Bash in their PowerShell profile when needed.

Test Plan

  • bash -lc 'bash -n install.sh scripts/*.sh'
  • bats tests/test_install.bats - not run locally because bats is not installed in this environment

The PowerShell launcher (scripts/windows/agmsg.ps1 + install-agmsg.ps1) was a
thin shim that located Git Bash and forwarded to the Bash scripts. Codex on
Windows runs commands through PowerShell, so agents can call the scripts
directly via Git Bash (`bash -lc 'scripts/*.sh'`), and delivery hooks are
already wrapped for Git Bash by windows_wrap() in delivery.sh. The separate
PowerShell reimplementation is now redundant.

Removed:
- scripts/windows/agmsg.ps1, scripts/windows/install-agmsg.ps1
- docs/windows.md
- tests/smoke_windows_powershell.ps1, tests/test_windows_powershell.bats
- the PowerShell launcher install step in install.sh
- the README "Native Windows / PowerShell" section (replaced with a Git Bash note)

Kept (general Windows support): the Bash dispatcher (dispatch.sh), the delivery
hook Git Bash wrapping (delivery.sh windows_wrap), the sqlite3 shim, and
install.sh's legacy-helper cleanup.

BREAKING CHANGE: the `agmsg` PowerShell command is no longer installed. On
Windows, call the scripts through Git Bash, e.g.
`bash -lc 'scripts/whoami.sh "$(pwd)" codex'`. If a bare `bash` resolves to the
WSL shim, pin Git Bash in your PowerShell profile:
Set-Alias bash 'C:\Program Files\Git\bin\bash.exe'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpJ8VvSV1hNdJWy875V5tm
@lucianlamp

Copy link
Copy Markdown
Contributor Author

CI note: the targeted checks for this PR are green, including bats (windows-latest, install helpers).

The only non-green check is bats (windows-latest, full (experimental)), which is the existing best-effort full Windows suite. Its failures are in broader Windows areas such as actas lock claiming and delivery/settings JSON round-trips, then the job hits the 12 minute timeout. Those failures do not appear to be caused by removing the PowerShell launcher; the scoped install-helper Windows leg that covers this change passes.

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.

1 participant