You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex usage collector passes removed '-a untrusted' flag, so limits never load #232
The Codex tab in the agents panel shows "Codex limits unavailable" with no plan
and no limit meters. Local token stats (tokens by day / by model) are correct —
only the limits and plan half is missing.
Current codex-cli no longer accepts untrusted as an --ask-for-approval
value. On codex-cli 0.149.1:
$ codex -s read-only -a untrusted app-server
error: invalid value 'untrusted' for '--ask-for-approval <APPROVAL_POLICY>'
[possible values: on-request, never]
Codex exits with status 2 immediately. Because stderr is sent to DEVNULL
and Popen itself succeeds, the collector never notices — it waits on the initialize RPC until the 8s timeout fires. The resulting TimeoutError
message is just the method name, which is why authHelpText reads "initialize" rather than anything diagnostic.
Fix
Swapping untrusted for never restores the full chain — verified locally on
codex-cli 0.149.1, Arch Linux:
account/read then returns the plan and account/rateLimits/read returns the
live windows, and the panel renders "Pro" with the weekly meter.
Dropping -a entirely also works and additionally surfaces the per-model
buckets in rateLimitsByLimitId (e.g. a 5h window for GPT-5.3-Codex-Spark),
though the collector only reads primary/secondary so the panel is
unaffected either way.
Possibly worth fixing alongside
Two things made this harder to diagnose than it needed to be:
stderr=subprocess.DEVNULL on the app-server Popen swallows the actual
CLI error. Capturing it and including it in authHelpText on failure would
have named the problem immediately.
A dead child is indistinguishable from a slow one — the collector burns the
full 8s timeout on a process that already exited. A proc.poll() check on
the timeout path (or a TimeoutError message that includes the exit status)
would turn "initialize" into something actionable.
Follow-up: this is already fixed upstream, so this is a fork-sync issue rather
than a new bug.
basecamp/omarchy fixed it in 4cd8a08 — "Fix Codex usage collection on
0.149 (omacom#7649)", 2026-08-25 — and their bin/omarchy-agent-usage-codex:531 now
reads:
Note they went with on-request rather than the never I suggested above.
Either works for this call path — the collector only issues account/read and account/rateLimits/read and never executes anything, and -s read-only
sandboxes it regardless — but matching upstream keeps the file identical across
the sync.
So the fix here is just to pull 4cd8a08 into this fork. The two diagnostic
suggestions in the original report still stand on their own if you want them —
upstream's commit does not address either, so the next time the app-server CLI
surface changes, this will fail the same silent way.
Activity
andreivcodes commentedon Aug 25, 2026
Follow-up: this is already fixed upstream, so this is a fork-sync issue rather
than a new bug.
basecamp/omarchyfixed it in 4cd8a08 — "Fix Codex usage collection on0.149 (omacom#7649)", 2026-08-25 — and their
bin/omarchy-agent-usage-codex:531nowreads:
Note they went with
on-requestrather than theneverI suggested above.Either works for this call path — the collector only issues
account/readandaccount/rateLimits/readand never executes anything, and-s read-onlysandboxes it regardless — but matching upstream keeps the file identical across
the sync.
Upstream also tracked several reports of this (all closed as completed by that
commit): omacom#7648, omacom#7781, omacom#7842, omacom#7873, omacom#7997, omacom#8032.
So the fix here is just to pull 4cd8a08 into this fork. The two diagnostic
suggestions in the original report still stand on their own if you want them —
upstream's commit does not address either, so the next time the app-server CLI
surface changes, this will fail the same silent way.
fix(codex): use never for ask-for-approval and improve diagnostics