Skip to content

Codex usage widget always shows "Codex limits unavailable" (initialize timeout) with current codex-cli #7781

Closed

Description

@keithnyc

What happened

The AI agent usage panel's Codex tab always shows "CODEX LIMITS UNAVAILABLE" with the status text initialize. Local token stats (tokens by day, tokens by model) populate correctly, but the live rate-limit/plan section never loads.

Root cause

/usr/share/omarchy/bin/omarchy-agent-usage-codex starts the Codex app-server with:

codex -s read-only -a untrusted app-server

The installed codex-cli (0.149.0) no longer accepts untrusted as a value for -a/--ask-for-approval:

$ codex -s read-only -a untrusted app-server
error: invalid value 'untrusted' for '--ask-for-approval <APPROVAL_POLICY>'
  [possible values: on-request, never]

Because the subprocess exits immediately on this CLI parse error instead of speaking the app-server RPC protocol, the script's initialize RPC call (in fetch_codex_rpc()) never gets a response and hits its 8-second timeout. The resulting TimeoutError("initialize") is what surfaces as the literal text initialize in the widget's status/help line.

Expected

The Codex tab should show real rate limits, or at least a clearer error, instead of silently timing out due to an invalid CLI flag value.

Steps to reproduce

  1. Have current codex-cli (0.149.0+) installed and authenticated (codex login).
  2. Open the AI agent usage panel, switch to the Codex tab.
  3. Observe "CODEX LIMITS UNAVAILABLE" / initialize.
  4. Confirm directly: codex -s read-only -a untrusted app-server errors with an invalid value for -a.

Suggested fix

Update the -a value passed in fetch_codex_rpc() (in omarchy-agent-usage-codex) to one of the currently accepted values (on-request or never), or drop the flag and rely on the default.

System details

  • Omarchy version: 4.0.0.r1791.ged7bae4-1
  • codex-cli version: 0.149.0
  • Installed via mise (~/.local/share/mise/installs/codex/latest)

Activity

  1. added a commit that references this issue on Aug 22, 2026
    97fc563
  2. keithnyc commented on Aug 22, 2026

    @keithnyc
    Author

    Duplicate of #7648, which was filed first and already has a fix up in #7770. Closing this one in favor of that.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions