Skip to content

Fix Codex lifecycle hook commands on Windows - #376

Open
Feanux3 wants to merge 2 commits into
AgentSystemLabs:mainfrom
Feanux3:fix/codex-windows-hooks
Open

Feanux3 wants to merge 2 commits into
AgentSystemLabs:mainfrom
Feanux3:fix/codex-windows-hooks

Conversation

@Feanux3

@Feanux3 Feanux3 commented Oct 21, 2026

Copy link
Copy Markdown

Codex workers on native Windows fail lifecycle hooks every turn because Office emits POSIX single-quoted commands. PowerShell does not invoke a quoted executable without its call operator, and Command Prompt does not recognize those quotes.

Generate an encoded PowerShell command on Windows, preserve UTF-8 stdin, quote paths literally, and suppress module progress output. POSIX commands retain their current quoting. Document how existing workers receive the updated commands.

Validation:

  • Typecheck and production build passed.
  • All 8 Codex tests passed, including executing generated commands under cmd.exe and PowerShell with spaces, apostrophes, shell characters and Unicode.
  • Live Windows hook invocation exited 0 and was accepted by the authenticated Office bridge.
  • Full suite: 553 passed, 62 failed on Windows, primarily fake-agent launch timeouts; see limitations rather than treating the suite as green.

muguetdev pushed a commit to muguetdev/agent-office that referenced this pull request Oct 27, 2026
…#376 and AgentSystemLabs#280)

Codex runs its lifecycle hooks through cmd.exe or PowerShell on Windows, where
the POSIX-quoted command never ran. Each hook is now an encoded PowerShell
command that keeps the paths literal, pipes the hook its stdin as UTF-8 with
PowerShell's progress output off (Agent Office AgentSystemLabs#376), and exits with the hook's own code
(Agent Office AgentSystemLabs#280). From AgentSystemLabs#280 too: a building holds up to 32 project floors, not 16.

Co-authored-by: schnepg1 <61694790+schnepg1@users.noreply.github.com>
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