Skip to content

omarchy-agent-usage-codex: account/rateLimits/read RPC timeout (4s) misreported as unavailable #12880

Closed

Description

@tundakk

What happened

The Codex agent-usage collector sometimes reports no rate-limit data. The panel and a custom alert script show "Codex limits unavailable." The stored authHelpText is the literal string account/rateLimits/read — this is the exception text from a timeout, not an auth message.

Root cause

fetch_codex_rpc() in bin/omarchy-agent-usage-codex calls rpc_request(proc, 3, "account/rateLimits/read", timeout=4). The Codex app-server process starts fresh on every collector run. Under normal dev load (other Codex or Claude Code sessions, background builds), this call sometimes exceeds 4 seconds. rpc_request() raises TimeoutError(method). The collector stores str(exc) as authHelpText, which prints only the method name, not a timeout description.

What I expected

Either the RPC call finishes inside its timeout, or the failure text reads as a timeout, not an auth problem.

Steps to reproduce

  1. Run several concurrent Codex or Claude Code sessions, or another CPU-heavy job.
  2. Run omarchy agent usage-update codex --force a few times, or wait for the panel's normal refresh.
  3. Watch ~/.local/state/omarchy/agents/usage/codex.json. Under load, usageStatusText becomes "Codex limits unavailable" and authHelpText becomes "account/rateLimits/read".
  4. The next refresh, with no code change, often succeeds. This confirms a timing race, not an auth failure.

Suggested fix

  1. Raise the timeout on the account/rateLimits/read call, or retry once before giving up.
  2. Give a timed-out rpc_request() call a clear message, so authHelpText does not read like a permission problem.

System

  • Omarchy 4.0.4-1, Hyprland 0.56.2
  • Codex CLI 0.155.1, plan: plus
  • Framework Laptop 13 Pro (AMD Ryzen AI 300 series)

Activity

  1. omarchybot commented on Oct 4, 2026

    @omarchybot
    Collaborator

    #14049 has merged into quattro: raw-fd reads prevent stranded replies, initialization and rate-limit requests allow eight seconds, and timeout messages name the stall. Optional account/read allows two seconds. There is no general retry or last-good-limits fallback; keeping this report open for remaining slow-response failures.

    Scope checked by GPT-6 in Codex and Codex Medium against the reports and landed source. The second opinion agreed with this scope; independence is not guaranteed. No runtime tests were rerun for this reconciliation.

  2. omarchybot commented on Oct 26, 2026

    @omarchybot
    Collaborator

    Fixed by #14049, merged Oct 3: the Codex collector now gives the rate-limit read 8 s and reports a timeout as a timeout, not as unavailable. Checked by Claude Opus 5.5 against current quattro; no second-opinion review ran.

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions