Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(platform): pwsh EncodedCommand transport with UTF-8 prelude

2 months ago

4c73af1
Authored
Max Weinbach7/7/2026, 11:38:15 AM
The model's command now crosses EXACTLY ONE shell interpretation layer on
every OS. win32 sends base64(UTF-16LE) via -EncodedCommand — eliminating the
PowerShell CLI re-parse that corrupted embedded quotes/backticks/$ (the
git commit -m class). The module-owned script wraps the command with a UTF-8
output pin (pwsh 7 + 5.1 + PYTHONUTF8) and the pinned GH-Actions exit-code
guard: native-last exit codes finally propagate (cmd /c exit 3 => 3, was 1).
Commands past the CreateProcess ceiling ship as a BOM-prefixed -File temp
script the bash runner materializes and removes. POSIX $SHELL is now honored
only for sh-compatible basenames (fish/nushell start at /bin/bash instead of
masking the fallback chain). displayCommand preserves readable logging.

Live-verified against real pwsh on Windows: quote round-trip, exit-code
matrix, unicode output, oversized -File lane.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Parent8a52b2a

4 files changed
  • src/platform/shell.ts+99−19
  • src/tools/bash.ts+147−124
  • test/platform/shellPlan.test.ts+159−0
  • test/tools/tools.bash.test.ts+7−4