codex keeps hanging out when runs pytest

Resolved 💬 3 comments Opened Nov 6, 2025 by ihribernik Closed Jan 17, 2026

What version of Codex is running?

codex-cli 0.55.0

What subscription do you have?

Plus

Which model were you using?

gpt-5-codex

What platform is your computer?

Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 x86_64

What issue are you seeing?

I am doing some refactoring in a Python/FastAPI project. In some cases, when I ask Codex to write test cases for me, it hangs when it tries to run pytest to execute the whole test suite (as shown in the image).
The test suite is small (around 17 short tests), but the execution gets stuck and never completes.

<img width="1912" height="316" alt="Image" src="https://github.com/user-attachments/assets/82bf83d2-da7e-435c-8830-eb5f2f32576f" />

What steps can reproduce the bug?

  1. activate a virtualenv
  2. launch codex
  3. ask to codex to run pytest

Uploaded thread: 019a5a65-84b5-75f1-b265-ae30a5761c18

What is the expected behavior?

codex must display/read the test result and continue with the task mentioned

Additional information

currently i am using ubuntu 24.04 inside wsl

View original on GitHub ↗

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