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

  1. Run:

```bash
uv run pytest -v

  1. Or run medium/large test batches (multiple tests/*.py files).
  2. 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.

View original on GitHub ↗

3 Comments

sean3808 · 6 months ago

## Reproduction Threshold

  • Small batch: works (e.g. 10-30 tests, ~<30s)
  • Large batch: fails (e.g. >80 tests or >60s, verbose output)
  • Failure rate: X / Y runs
  • Typical failure time: ~N seconds after start
etraut-openai contributor · 6 months ago

If you are able to repro this, please use the /feedback slash command to upload the logs and session data, then post the thread ID here.

sean3808 · 6 months ago

thread ID 019c3911-d5c5-7940-8458-d1d52528cd4e
tks!