Codex usage widget always shows "Codex limits unavailable" (initialize timeout) with current codex-cli
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
- Have current
codex-cli(0.149.0+) installed and authenticated (codex login). - Open the AI agent usage panel, switch to the Codex tab.
- Observe "CODEX LIMITS UNAVAILABLE" /
initialize. - Confirm directly:
codex -s read-only -a untrusted app-servererrors 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)
Duplicate of #7648, which was filed first and already has a fix up in #7770. Closing this one in favor of that.