Environment
- OS: Windows 11 Pro
- Shell: Git for Windows bash (MSYS2)
- agmsg: 1.1.11 (main @ 7c6220e)
- herdr: 0.7.5-preview.2026-07-29-44b3adb12552 (Windows beta)
- agent CLI: codex 0.146.0
Repro
- Run a shell inside a herdr pane on Windows (
HERDR_ENV=1, HERDR_PANE_ID set, herdr on PATH).
spawn.sh codex some-name --window --boot-prompt "..."
What happens
launch_in_herdr creates the tab fine (all the JSON parsing works), then does herdr pane run "$new_id" "$BOOT" where $BOOT is the extension-less bash boot script (e.g. C:/Users/<me>/AppData/Local/Temp/agmsg-spawn/boot-XXXXXX). On Windows the herdr pane's default shell is PowerShell, so the path is just typed into PowerShell, which cannot execute an extension-less bash script — Windows pops the "How do you want to open this file?" picker (or silently returns to the prompt). The agent never boots; the tab sits at an idle PS prompt.
Everything else on the Windows path works: socket API from Git Bash, tab create/read/run, HERDR_ENV/HERDR_PANE_ID propagation into MSYS bash. I verified that running the same boot script wrapped in Git Bash inside that pane boots the agent normally.
Suggested fix
Wrap the boot invocation for Windows in launch_in_herdr, same pattern the project already uses for commandWindows in hooks.json:
herdr pane rename "$new_id" "$NAME" >/dev/null 2>&1 || true
- herdr pane run "$new_id" "$BOOT" 2>/dev/null \
- || die "herdr pane run failed for pane $new_id"
+ case "$(uname -s)" in
+ MINGW*|MSYS*|CYGWIN*)
+ _gb="${GIT_BASH:-${AGMSG_BASH:-C:\\Program Files\\Git\\bin\\bash.exe}}"
+ herdr pane run "$new_id" "& '${_gb}' -lc '${BOOT}'" 2>/dev/null \
+ || die "herdr pane run failed for pane $new_id" ;;
+ *)
+ herdr pane run "$new_id" "$BOOT" 2>/dev/null \
+ || die "herdr pane run failed for pane $new_id" ;;
+ esac
Tested locally on the environment above: spawn → herdr tab → codex boots → agmsg message delivered back. Happy to PR if useful.
Environment
Repro
HERDR_ENV=1,HERDR_PANE_IDset,herdron PATH).spawn.sh codex some-name --window --boot-prompt "..."What happens
launch_in_herdrcreates the tab fine (all the JSON parsing works), then doesherdr pane run "$new_id" "$BOOT"where$BOOTis the extension-less bash boot script (e.g.C:/Users/<me>/AppData/Local/Temp/agmsg-spawn/boot-XXXXXX). On Windows the herdr pane's default shell is PowerShell, so the path is just typed into PowerShell, which cannot execute an extension-less bash script — Windows pops the "How do you want to open this file?" picker (or silently returns to the prompt). The agent never boots; the tab sits at an idle PS prompt.Everything else on the Windows path works: socket API from Git Bash, tab create/read/run,
HERDR_ENV/HERDR_PANE_IDpropagation into MSYS bash. I verified that running the same boot script wrapped in Git Bash inside that pane boots the agent normally.Suggested fix
Wrap the boot invocation for Windows in
launch_in_herdr, same pattern the project already uses forcommandWindowsin hooks.json:Tested locally on the environment above: spawn → herdr tab → codex boots → agmsg message delivered back. Happy to PR if useful.