Skip to content

Codex gets stuck in a deadlock #13140

Open

Description

@valderimedeiros

What version of Codex CLI is running?

codex-cli 0.106.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What terminal emulator and version are you using (if applicable)?

PowerShell and VSCode

What issue are you seeing?

Even with very simple tasks, the codex gets stuck in a deadlock and continues planning or working indefinitely.

I'm just trying Codex after successfully using Claude Code; my experience is the worst ever.

Thread ID 019ca206-b1b7-77c2-a25e-2577039108a

Image

What steps can reproduce the bug?

Just use it in a Flutter project.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bug
    on Feb 28, 2026
  2. added
    CLI
    windows-os
    model-behavior
    on Feb 28, 2026
  3. removed
    model-behavior
    on Feb 28, 2026
  4. fxha commented on Mar 14, 2026

    @fxha

    I ran into the same problem with Flutter. The problem seems to be that running flutter --version on Windows uses git and attempts to write files to the Flutter SDK directory. This causes the Git process to hang indefinitely, which causes Codex to hang as well until the Flutter/Git process is manually terminated.

    I have found two workarounds:

    1. For simple Flutter/Dart tasks: add the Dart MCP and ask the agent to use the MCP instead of Flutter commands once per session.
    2. For more complex tasks or chained tool calls: add the Flutter SDK path to the Codex sandbox whitelist in config.toml:
    [sandbox_workspace_write]
    writable_roots = ["E:\\SDK\\flutter"]

    While this prevents the Git process from hanging indefinitely, it leads to a follow-up issue with the Codex sandbox. The sandbox user lacks write permissions for the Flutter SDK directory, causing the Git process to be terminated due to Windows filesystem/user permissions. Codex will then ask if the command (e.g. cargo check) should be executed without the sandbox. This provides at least a way to complete Flutter tasks without having to disable the sandbox entirely or kill the process and run the steps manually.

    I guess a hacky way to resolve this issue is by giving the Codex sandbox user access to the Flutter SDK folder. But I'm not familiar with the Codex sandbox and don't want to make any system changes. The second workaround works well for me.

    See also #13914.

  5. added
    agent
    and removed
    CLI
    on Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions