Codex session disconnects during long-running/high-output commands on Windows PowerShell (aborted / Unknown process id)
Open 💬 3 comments Opened Feb 8, 2026 by sean3808
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
Summary
When running longer test commands in Codex on Windows + PowerShell, the session frequently drops and becomes unusable.
- OS: Windows
- Shell: PowerShell
- Project type: Python (
uv+pytest)
## Steps to Reproduce
- Run:
```bash
uv run pytest -v
- Or run medium/large test batches (multiple tests/*.py files).
- Wait during execution and continue polling output.
## Actual Behavior
- Session terminates unexpectedly.
- Errors include:
- aborted
- write_stdin failed: Unknown process id <id>
- In some runs, output log files are 0 bytes (suggesting interruption before command fully starts).
- This happened repeatedly (at least 4 times in one session).
## Expected Behavior
- Session remains stable for long-running/high-output commands.
- If session transport fails, background process control and exit-code retrieval should still be reliable.
## Temporary Workaround (works)
- Use detached background execution + log polling (instead of streaming large output directly).
- Start pytest in background, then poll status/log tail with short commands.
- This reliably completed the same batch (example: 31 passed).
## Impact
- Long test/verification workflows are unreliable.
- Requires custom scripts and manual polling.
- Reduces development productivity.
3 Comments
## Reproduction Threshold
If you are able to repro this, please use the
/feedbackslash command to upload the logs and session data, then post the thread ID here.thread ID 019c3911-d5c5-7940-8458-d1d52528cd4e
tks!