Exit when the Codex process dies - #359
Open
jmeyers91 wants to merge 1 commit into
Open
Conversation
jmeyers91
force-pushed
the
fix/exit-on-backend-death
branch
from
August 3, 2026 02:57
674a8e6 to
56ed8bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exitor stdout EOF) instead of keeping the ACP connection opensession/prompt, a login waiting on its completion) hung forever; only the next request failed, with a generic "Connection is disposed"runWithProcessCheckdelivers lazily, including the missing-VC++-redistributable case, stay visiblelogin/clisubcommands are untouchedstdout endis watched as well asexitbecause the win32 spawn goes through a shell, so the child handle can outlive the real codex processTesting
npm run typechecknpm test(340 passed, 29 skipped)acp-e2e-backend-death.test.ts(POSIX-only): SIGKILLs the codex app-server under a spawned agent, asserts the agent exits within 5s — fails on main, passes with this change; run locally like the other e2e specsCODEX_HOME, fake key, local tarpit for the model call): https://github.com/jmeyers91/codex-acp-backend-death-repro —npm run reproshows the hang on published 1.1.9;ADAPTER_ENTRY=path/to/dist/index.js node repro.mjsshows the fixCODEX_PATHroute