Skip to content

Codex CLI agent crashes with 401 unauthorized error on Windows #800

Open

Description

@constantinodominica-ui

What happened?

Environment:

  • Windows 11
  • Munder Difflin v0.5.7
  • Node.js v26.13.0
  • Codex CLI v0.165.0

I installed Codex CLI using npm install -g @openai/codex and successfully logged in using ChatGPT. The standalone Codex CLI works correctly and can respond to prompts.

However, when Munder Difflin starts the AI Director using the Codex engine, the agent crashes with this error:

Error: account/read failed during TUI bootstrap: account/read failed: workspace routing discovery unauthorized (401) (code -32603)

The AI Director exits with code 1, and submitted tasks remain held in the queue.

I have restarted Munder Difflin and confirmed that the standalone Codex CLI still works. The problem only occurs when Munder Difflin launches the agent.

Expected behavior: The AI Director should start successfully using my authenticated Codex CLI account.

Could you please help me identify the cause and suggest a fix? I would prefer to use my existing ChatGPT/Codex login rather than configure a separate API key, if supported. I installed Munder Difflin using the official Windows .exe installer, not from source. Therefore, the npm install / node-pty rebuild step is not applicable to my installation.

Steps to reproduce

  1. Install Munder Difflin v0.5.7 on Windows.
  2. Install Node.js v26.13.0.
  3. Install Codex CLI using npm install -g @openai/codex.
  4. Run codex login and sign in using ChatGPT.
  5. Verify that codex login status reports Logged in using ChatGPT.
  6. Run codex in CMD and confirm that it can respond to a simple prompt.
  7. Configure a local Munder Difflin workspace and select the Codex engine for the AI Director.
  8. Start the AI Director.
  9. Observe the 401 unauthorized error and process exit code 1.
Image Image

Screenshot or screen recording

Image Image

Logs / stack trace

Error: account/read failed during TUI bootstrap: workspace routing discovery unauthorized (401) (code -32603)

process exited (code 1)

Operating system

Windows

OS version

Windows 11 Pro 25H2 (Build 26200.9711)

Munder Difflin version

0.5.7

Node version

v26.13.0

Agent CLI and version (if relevant)

Codex CLI v0.165.0

Pre-flight

  • I attached a screenshot or recording above.
  • I'm on the latest release, or I've said above why I can't be.
  • I re-ran npm install so node-pty is rebuilt for the current Electron ABI (source installs only).
  • I searched existing issues and this isn't a duplicate.
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

    bugSomething isn't workingos:windowsReported on Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions