openai / openai/codex

Windows Codex loses foreground command execution handle after ~30 seconds —

Open
#38,069 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug tool-calls windows-os
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.805.11740

What subscription do you have?

Plus

What platform is your computer?

Windows 11

What issue are you seeing?

Codex version: 26.805.11740
OS: Windows 11
Sandbox: Workspace write
Codex Workspace Diagnose: Dependencies look healthy

Problem

Codex repeatedly loses the execution/session handle for foreground commands after approximately 30 seconds.

The failure occurs with:

exec cell 11 not found

This initially appeared during Playwright tests, but I reproduced it with a minimal PowerShell command that does not use Node.js, Playwright, Git, or my project.

Minimal reproduction

Run a foreground PowerShell command that emits a heartbeat every 10 seconds for 90 seconds:

1..9 | ForEach-Object {
Write-Output ("CODEX-RUNNER-HEARTBEAT " + $_ + "/9 " + (Get-Date -Format "HH:mm:ss"))
Start-Sleep -Seconds 10
}
Write-Output "CODEX-RUNNER-DIAGNOSTIC-COMPLETE"
Result
RESULT: FAIL
HEARTBEATS OBSERVED: 3/9
FINAL MARKER OBSERVED: NO
EXIT CODE: unavailable
EXECUTION-HANDLE ERROR: exec cell 11 not found
TOTAL DURATION: approximately 30 seconds

The command is started successfully, but Codex loses the execution handle before the process completes.

Restarting Windows did not fix the problem.
Workspace dependencies diagnose as healthy.

The same long-running Playwright command completes normally when executed directly in Windows PowerShell outside Codex.

This appears to be a Windows Codex command-runner/session-management issue rather than a Node, Playwright, Git, or project-specific problem.

Reproduced: August 11, 2026, around 4:00 PM EDT.

What steps can reproduce the bug?

Codex version: 26.805.11740
OS: Windows 11
Sandbox: Workspace write
Codex Workspace Diagnose: Dependencies look healthy

Problem

Codex repeatedly loses the execution/session handle for foreground commands after approximately 30 seconds.

The failure occurs with:

exec cell 11 not found

This initially appeared during Playwright tests, but I reproduced it with a minimal PowerShell command that does not use Node.js, Playwright, Git, or my project.

Minimal reproduction

Run a foreground PowerShell command that emits a heartbeat every 10 seconds for 90 seconds:

1..9 | ForEach-Object {
Write-Output ("CODEX-RUNNER-HEARTBEAT " + $_ + "/9 " + (Get-Date -Format "HH:mm:ss"))
Start-Sleep -Seconds 10
}
Write-Output "CODEX-RUNNER-DIAGNOSTIC-COMPLETE"
Result
RESULT: FAIL
HEARTBEATS OBSERVED: 3/9
FINAL MARKER OBSERVED: NO
EXIT CODE: unavailable
EXECUTION-HANDLE ERROR: exec cell 11 not found
TOTAL DURATION: approximately 30 seconds

The command is started successfully, but Codex loses the execution handle before the process completes.

Restarting Windows did not fix the problem.
Workspace dependencies diagnose as healthy.

The same long-running Playwright command completes normally when executed directly in Windows PowerShell outside Codex.

This appears to be a Windows Codex command-runner/session-management issue rather than a Node, Playwright, Git, or project-specific problem.

Reproduced: August 11, 2026, around 4:00 PM EDT.

What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal PowerShell heartbeat reproduction described in the issue on Windows 11, then compare its behavior inside Codex with direct Windows PowerShell. Investigate the Codex foreground command runner and session-handle lifecycle; done means a 90-second command retains its handle, reports all heartbeats, emits the final marker, and provides an exit code.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.