[bug] On Windows, runCommandHook in LIFEOS/CODEX/Bridge.ts does not stop at the hook…
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- cli
Research direction
Start at runCommandHook in LIFEOS/CODEX/Bridge.ts and read the timeout handler together with the close listener that currently decides when the promise resolves. Reproduce by passing a SessionStart hook of sleep 8 with timeout: 2 through bridge() via deps.settings and timing the call. The fix is the reporter's: on win32, run taskkill /PID <child.pid> /T /F while the parent link still exists, then resolve as timed out without waiting for close. Done means the bridge returns near the timeout on Windows and no child process is left behind.
Written by the indexing model from the issue text.
Description
What happened
On Windows, runCommandHook in LIFEOS/CODEX/Bridge.ts does not stop at the hook timeout. The timer kills Git sh.exe, but the hook child process (bun, sleep) keeps running and holds the stdout and stderr pipes, so the close event fires only when the child ends and the bridge waits with it. Measured: a hook running sleep 8 with timeout 2 took 8.1 s. A local patch fixed it: on win32, run taskkill /PID /T /F before child.kill and resolve as timed out (2.1 s with sleep 60, no leftover processes).
Summary
On Windows, killing the hook's sh.exe does not kill the process it started, and that child keeps the pipes open, so runCommandHook resolves only when the child exits on its own. A hung hook holds the Codex bridge past its timeout, up to Codex's own hook timeout.
Repro: a SessionStart hook sleep 8 with timeout: 2 passed to bridge() through deps.settings takes about 8 s instead of about 2 s.
Fix that worked locally: in the timeout handler, on win32 run taskkill /PID <child.pid> /T /F before child.kill() (while the parent link still exists), then resolve as timed out without waiting for close. With sleep 60 and timeout: 2 the bridge returned in 2.1 s and no sleep process was left.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
- Dominant language
- TypeScript
- Stars
- 19.8k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from danielmiessler/LifeOS
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
danielmiessler/LifeOS#2824 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
danielmiessler/LifeOS#2822 ·
Maintainers usually reply within 6 days
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
danielmiessler/LifeOS#2818 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
danielmiessler/LifeOS#2817 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
danielmiessler/LifeOS#2808 ·
Maintainers usually reply within 6 days
All issues in danielmiessler/LifeOS
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tintinweb/pi-subagents#459 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
freshframework/fresh#3920 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: client enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
opensro-dev/opensro#3681 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day