OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
omarchy-core low common DISPUTE

Fix 'Codex limits unavailable' with the help text `initialize` in the Agents panel

omarchyomarchy-shellquickshellcodexmise
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Checked every cited source again on 2026-09-11 and confirmed the mechanical claims on this workstation, which runs omarchy 4.0.2-1. Confirmed locally, four things. grep -n '"-a"' /usr/share/omarchy/bin/omarchy-agent-usage-codex returns exactly line 531 with on-request, so the record's closing quote is right. find_command is shutil.which(name, path=ENV.get("PATH")) at lines 90 to 91, so wrapping codex on PATH really is the mechanism the fix warns about. omarchy-agent-usage-update accepts --force and --limits-only as flags and treats any other word as an agent name, and it iterates "$OMARCHY_PATH"/bin/omarchy-agent-usage-* by absolute path, so omarchy agent usage-update --force codex is a valid invocation and nothing on PATH can shadow a collector. The collector's own argparse accepts --limits-only at line 582. codex-cli 0.153.4 is installed here through mise, and running codex -s read-only -a untrusted app-server printed the record's error text verbatim and exited 2, so the rejection still holds three minor versions past the reports. Confirmed from sources, three things. The blob at v4.0.1 reads untrusted and the blobs at v4.0.2 and v4.0.3 read on-request. PR #7649 merged to quattro at 2026-08-25T14:07:17Z against the v4.0.1 tag published at 2026-08-25T11:24:30Z, which is two hours forty-three minutes rather than "about three hours", so I tightened it to the measured figure. All six issues exist and all describe this defect, five closed and #8460 still open, and the PATH-ordering trap in the fix is tony-roslund's comment on #8460 rather than an inference. Two things were wrong. First, the cause claimed rpc_request() raises after 8 seconds. It raises immediately, and I confirmed the path by reading lines 477 to 495 of the installed file: a closed pipe is reported readable by select(), readline() returns the empty string, if not line: break exits the loop, and the raise is the next statement, so the deadline is never consulted. Collaborator comments on #7648 and #7997 both correct this explicitly and give measurements of 42 to 44 ms and 7 to 8 ms. Second, the record's open question Q3 is answerable, so the record is not right to omit the upstream source. openai/codex#39630, "Retire the untrusted approval policy", is a pull request merged to main at 2026-08-20T07:04:50Z whose body states that it removes untrusted from the CLI, the configuration schema and the MCP tool interface. It is named in the omarchybot triage comment on #7648 and it retrieves cleanly, so I added it to the cause and to the sources. The symptom, fix and verify blocks are unchanged, because every claim in them held. Not exercised: I did not run omarchy agent usage-update, did not start app-server with an accepted policy, and did not open the Agents panel, so the restored plan line and meters are taken from reporters rather than observed here.

The cause above was rewritten on 2026-09-11 to match this note; the fix was corrected by the audit itself.

Symptom

The Codex tab of the omarchy-shell Agents panel stops showing subscription limits. Local token and session statistics still count, but the limits area reads Codex limits unavailable with the bare help text initialize where a plan line and meters belong. Refreshing the panel does not recover it, and codex login status and codex doctor report a healthy login.

The stored record and the packaged collector both show it:


$ jq '{limits, tierLabel, usageStatusText, authHelpText}' ~/.local/state/omarchy/agents/usage/codex.json
{
  "limits": [],
  "tierLabel": "",
  "usageStatusText": "Codex limits unavailable",
  "authHelpText": "initialize"
}

Launching app-server the way the collector does shows the real error:


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

Reported on Omarchy 4.0.0-1 and 4.0.1-1 with codex-cli 0.149.0, 0.149.1 and 0.150.1, mostly installed through mise, by at least five reporters across six threads with more closed as duplicates.

Cause

/usr/share/omarchy/bin/omarchy-agent-usage-codex starts the Codex app-server at line 531 with -a untrusted. codex-cli 0.149 retired that approval-policy value and accepts only on-request and never, so clap rejects the argument and the process exits with status 2 before speaking JSON-RPC. The retirement is upstream Codex, not Omarchy: openai/codex#39630, "Retire the untrusted approval policy", merged to main on 2026-08-20, removes untrusted from the CLI, from the configuration schema and from the MCP tool interface.

The collector sends the child's stderr to subprocess.DEVNULL at line 534, so the rejection is invisible to it. What happens next is fast, not slow, and several comments on the issue threads get this backwards. rpc_request() does carry an 8 second deadline, but it is never reached. The child has already exited, so its stdout is closed: select.select([proc.stdout], [], [], 0.25) at line 483 reports it readable, proc.stdout.readline() at line 486 returns "", if not line: break at line 487 leaves the loop, and raise TimeoutError(method) at line 495 fires on the next statement. Collaborators measured that path at 42 to 44 ms on issue 7648 and at 7 to 8 ms on issue 7997. The handler at lines 559 to 561 then writes str(exc) into authHelpText, and str(TimeoutError("initialize")) is the bare method name. That is why the panel renders an RPC method name where an authentication hint belongs. Nothing about authentication is wrong.

At the time of the reports Omarchy's own openai-codex-bin package was still on 0.148.0, the last version that accepts untrusted, so the people hitting this had installed Codex another way, mostly mise. PR #7649, commit 4cd8a081, changed the value to on-request and merged to quattro on 2026-08-25 at 14:07 UTC, two hours and forty-three minutes after the v4.0.1 tag was published at 11:24 UTC, which is why every 4.0.1-1 install reproduces it.

Omarchy 4.0.2 and 4.0.3 both carry the fix. On an omarchy 4.0.2-1 workstation, checked on 2026-09-11, line 531 of the installed collector reads:


      [codex, "-s", "read-only", "-a", "on-request", "app-server"],

Fix

**Omarchy 4.** Update to 4.0.2-1 or newer, then regenerate the usage records:


omarchy update
omarchy agent usage-update --force codex
jq '{tierLabel, usageStatusText, limits}' ~/.local/state/omarchy/agents/usage/codex.json

**Stuck on 4.0.1-1 or older with no update available.** Make the same one-line change the merged commit makes. The file belongs to the omarchy package, so the next omarchy update overwrites your edit with the released fix, which is the outcome you want:


sudo sed -i 's/"-a", "untrusted", "app-server"/"-a", "on-request", "app-server"/' /usr/share/omarchy/bin/omarchy-agent-usage-codex
grep -n '"-a"' /usr/share/omarchy/bin/omarchy-agent-usage-codex
omarchy agent usage-update --force codex

Reporters across three of the threads verified never works equally well here, because the collector only sends initialize, initialized, account/read and account/rateLimits/read and never starts a model turn. Use on-request anyway, to match what shipped.

Do not try to fix it by wrapping codex in ~/.local/bin. The collectors are called by absolute path under $OMARCHY_PATH/bin, and one reporter found omarchy-shell's PATH puts ~/.local/share/mise/shims ahead of ~/.local/bin, so the mise shim wins and the wrapper is ignored by the widget while the same test from a terminal succeeds. One reporter pinned codex-cli back to 0.148.0, the last version accepting untrusted, and nobody else confirmed that route.

Verify


grep -n '"-a"' /usr/share/omarchy/bin/omarchy-agent-usage-codex     # expect -a on-request
codex -s read-only -a on-request app-server </dev/null; echo "exit $?"    # must not print 'invalid value'
omarchy-agent-usage-codex --limits-only | jq '{tierLabel, limits, usageStatusText, authHelpText}'

tierLabel shows your plan, usageStatusText is empty and limits lists the 5 hour and weekly windows. Reporters saw them return in under a second, and the Codex tab shows the plan line and meters after the next refresh.

Sources

codex-limits-unavailable-agents-panel