Skip to content

fix(agents): hide async hook console window on Windows - #501

Open
put4o wants to merge 1 commit into
codemie-ai:mainfrom
put4o:fix/494-windows-hide-async-hooks
Open

fix(agents): hide async hook console window on Windows#501
put4o wants to merge 1 commit into
codemie-ai:mainfrom
put4o:fix/494-windows-hide-async-hooks

Conversation

@put4o

@put4o put4o commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Prevent asynchronous shell hooks from briefly opening a sh.exe console window on Windows.

Motivation

execCommandAsync() starts asynchronous hook commands using a detached sh process. On Windows, detached: true does not suppress the console window created for the child process, causing sh.exe to briefly flash during normal codemie-opencode usage.

Changes

  • Add windowsHide: true to the spawn() options used by asynchronous shell hooks.
  • Add regression coverage to ensure asynchronous hook processes continue to use the hidden-window option.

Testing

  • npm run lint — passed
  • npm run build — passed
  • npm run commitlint:last — passed
  • Regression test for windowsHide: true — passed
  • npm run ci — completed with 6 pre-existing failures in shell-hooks-source.test.ts on native Windows
  • The same 6 tests also fail on the unmodified baseline, confirming they are unrelated to this change

Breaking Changes

None.

Related Issues

Fixes #494

Add windowsHide to asynchronous shell hook processes so detached sh.exe processes do not flash a console window on Windows.

Fixes codemie-ai#494
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.

[Bug]: sh.exe console window flashes on Windows during async hook execution (missing windowsHide in spawn)

1 participant