Codex task becomes stuck if VS Code is closed while the agent is running

Open 💬 3 comments Opened Mar 4, 2026 by bymehul

What version of the IDE extension are you using?

0.5.80

What subscription do you have?

Go

Which IDE are you using?

VS Code

What platform is your computer?

Linux 6.14.0-29-generic x86_64 x86_64

What issue are you seeing?

If Codex is executing a task and VS Code is closed before the task finishes, the task becomes stuck when VS Code is reopened.

<img width="425" height="539" alt="Image" src="https://github.com/user-attachments/assets/88832e83-ac5a-45f3-825d-bc0d7a16805e" />

The Codex panel shows the task in a "Thinking" or running state. The Stop or Pause buttons do not stop the task and the agent does not recover from the interrupted session.

What steps can reproduce the bug?

If Codex is executing a task and VS Code is closed before the task finishes, the task becomes stuck when VS Code is reopened.

The Codex panel shows the task in a "Thinking" or running state. The Stop or Pause buttons do not stop the task and the agent does not recover from the interrupted session.

What is the expected behavior?

If VS Code is closed while Codex is running a task, the extension should either:

  1. Cancel the running task automatically, or
  2. Restore the task to a stoppable state when VS Code is reopened.

Additional information

Pressing Stop or Pause does not resolve the issue.

The task remains stuck in the UI and the agent appears unable to recover from the interrupted session.

View original on GitHub ↗

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