Skip to content

CLI: plain codex times out in workspace routing; explicit log_dir makes startup succeed #48600

Closed as duplicate

Description

@marcelritzschke

What version of Codex CLI is running?

codex-cli 0.157.1

Reinstalling and downgrading were also tried; the failure persisted.

What subscription do you have?

ChatGPT-authenticated account.

Which model were you using?

No model turn is reached; the failure occurs during TUI bootstrap.

What platform is your computer?

Reproduced on both Windows and WSL.

What issue are you seeing?

Plain codex consistently fails during TUI bootstrap with:

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

But explicitly setting log_dir to the normal Codex log location makes startup succeed:

codex -c log_dir="$HOME/.codex/log"

This is reproducible:

  • codex → fails with workspace routing timeout
  • codex -c log_dir="$HOME/.codex/log" → starts normally
  • fresh shell + codex → fails again
  • explicit log_dir again → works again

Because $HOME/.codex/log is the usual default log location, the interesting difference appears to be explicitly enabling/configuring log_dir, not the filesystem path itself.

Steps to reproduce

  1. Authenticate normally with ChatGPT.
  2. Run:
codex

Result:

Error: account/read failed during TUI bootstrap: account/read failed: workspace routing discovery timed out (code -32603)
  1. Run:
mkdir -p "$HOME/.codex/log"
codex -c log_dir="$HOME/.codex/log"

Result: Codex starts normally.

  1. Exit, open a fresh shell, and run plain codex again.

Result: the timeout returns.

Expected behavior

Plain codex should initialize the authenticated account and workspace routing regardless of whether log_dir is explicitly configured.

Additional observations

The issue persisted after:

  • reinstalling Codex
  • downgrading Codex
  • opening fresh shells
  • testing Windows host and WSL

The ChatGPT application works normally.

Basic reachability to the workspace-check endpoint is fast:

DNS:   0.000048s
TCP:   0.000757s
TLS:   0.194801s
TTFB:  0.375662s
TOTAL: 0.375796s
HTTP:  401

The 401 is expected for this unauthenticated probe; the relevant observation is that DNS/TCP/TLS/TTFB are fast.

Workaround

alias codex='command codex -c log_dir="$HOME/.codex/log"'

Possibly related

I did not find an existing report describing this explicit-log_dir A/B behavior.

Activity

  1. added
    bug
    CLI
    windows-os
    app-server
    connectivity
    on Sep 27, 2026
  2. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor
  3. changed the title [-]CLI: `workspace routing discovery timed out` during TUI bootstrap, but explicitly setting `log_dir` makes startup succeed[/-] [+]CLI: workspace routing timeout disappears when `log_dir` is set explicitly[/+] on Sep 27, 2026
  4. changed the title [-]CLI: workspace routing timeout disappears when `log_dir` is set explicitly[/-] [+]CLI: plain `codex` times out in workspace routing; explicit `log_dir` makes startup succeed[/+] on Sep 27, 2026
  5. marcelritzschke commented on Sep 27, 2026

    @marcelritzschke
    Author

    Closing as duplicate of #47145. I added the reproducible log_dir workaround / A-B behavior there.

  6. buraksahins commented on Sep 28, 2026

    @buraksahins

    I am reporting a regression in Codex authentication / workspace routing in the VS Code extension.

    Codex in VS Code is currently unusable for me because authentication repeatedly fails with:

    Sign-in failed: workspace routing discovery timed out

    This setup worked previously.

    The underlying workstation and network connection are functioning normally. SSH access to the workstation works correctly, the local network connection is stable, and VS Code Remote SSH itself is not the problem.

    The failure occurs specifically in the Codex authentication/account initialization path.

    Repeated authentication attempts do not solve the problem. The failure consistently occurs while Codex is trying to discover or restore the authenticated workspace.

    Please do not treat this as a generic local VS Code or SSH configuration problem. The error itself points to Codex workspace-routing discovery.

    I am also seeing recent reports from other users describing the same account/read / workspace routing discovery timed out failure after recent Codex releases.

    Please escalate this to the Codex engineering team and investigate whether a recent change to workspace routing, account discovery, authentication initialization, or the bundled Codex runtime introduced this regression.

    In particular, please investigate the request path involved in:

    account/read

    and workspace-routing discovery.

    Expected behavior:

    1. I authenticate with my ChatGPT account.
    2. Codex identifies my account/workspace.
    3. The VS Code extension starts normally.

    Actual behavior:

    1. Authentication is initiated.
    2. Workspace/account initialization starts.
    3. Codex fails with:

    Sign-in failed: workspace routing discovery timed out

    1. Codex cannot be used.

    This is blocking my development work.

    Please confirm whether this is a known regression and provide either a server-side fix or a supported workaround. I would also like this case attached to the existing engineering investigation if the same workspace-routing problem is already being tracked.

  7. BinBinHouse commented on Sep 30, 2026

    @BinBinHouse

    Still reproducible on codex-cli 0.159.2.

    Environment:

    • Windows 11
    • WSL2
    • Codex CLI: 0.159.2
    • ChatGPT-authenticated account

    Behavior:

    Plain startup consistently fails after ~17 seconds:

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

    This also happens with:

    codex resume --last

    Enabling a TUN/system proxy does not change the behavior.

    However, the workaround still works immediately:

    mkdir -p ~/.codex/log
    codex -c 'log_dir="~/.codex/log"'

    With the explicit log_dir, the TUI starts normally on the same machine, account, network, and Codex version.

    So this issue appears to still be present in 0.159.2.

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

    CLIapp-serverbugconnectivitywindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions