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

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 ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗