Proof Portal
Omarchy
ProbeLabs65 findings · 95 requirementsA proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.
Codex agent collector times out on rateLimits RPC due to buffered reader and 4s deadline
Reported by kcodedev · filed Sep 4, 2026 · open at source
At a glance
- 1 · What is claimed?
- Only the report text below — no validator has restated it as checkable claims yet.
- 2 · What does it affect?
- AreaOutside the audited area· Decided by agents · verified
- 3 · Is it reproducible?
- No validation has been run yet.
- 4 · What remains unclear?
- Not validated yet: no claims, no reproducer.
- 5 · What happens next?
- Decided by agents and verified by a second, independent agent — see the decision.
Original report
What happened
The omarchy.agents bar widget collects and renders Codex's local token stats, but the live subscription limits section shows:
CODEX LIMITS UNAVAILABLE
account/rateLimits/readThe generated record contains an empty plan and limits array:
{
"tierLabel": "",
"limits": [],
"usageStatusText": "Codex limits unavailable",
"authHelpText": "account/rateLimits/read"
}This is distinct from the older -a untrusted reports. Omarchy 4.0.2-1 correctly launches Codex with -a on-request; initialize and account/read both succeed. Only account/rateLimits/read times out.
Expected
The widget should display the authenticated Codex plan and its rate-limit windows.
Steps to reproduce
- Install and authenticate Codex CLI 0.151.0.
- Run:
"$OMARCHY_PATH/bin/omarchy-agent-usage-update" --limits-only codex
jq '{tierLabel,limits,usageStatusText,authHelpText}' \
~/.local/state/omarchy/agents/usage/codex.json- Observe the empty fields shown above.
- Speak the same JSONL protocol directly to
codex -s read-only -a on-request app-server. The server successfully returnsinitialize, an unsolicitedremoteControl/status/changednotification,account/read, and eventually a populated response foraccount/rateLimits/read.
Root cause
There are two fragile parts in bin/omarchy-agent-usage-codex:
- The rate-limit request has a hard-coded four-second deadline:
limits_msg = rpc_request(proc, 3, "account/rateLimits/read", timeout=4)The response takes longer on this otherwise working installation.
rpc_request()combinesselect()on a bufferedTextIOWrapperwithreadline():
ready, _, _ = select.select([proc.stdout], [], [], 0.25)
line = proc.stdout.readline() readline() may prefetch multiple JSONL messages into Python's user-space buffer. A later select() checks only the kernel file descriptor, so it can wait even though a complete response is already buffered. The app-server's unsolicited notification makes multiple interleaved lines normal rather than exceptional.
The thrown TimeoutError(method) is then rendered as the bare method name, which is why the panel shows account/rateLimits/read rather than a useful diagnostic.
Verified workaround
A user-level override that made both changes fixed the widget:
- Read the subprocess fd with
os.read()and maintain an explicit newline buffer, avoidingTextIOWrapper/select()desynchronization. - Give
account/rateLimits/reada 20-second timeout.
After that change, the same collector returns a populated plan and weekly rate-limit window. Reverting to the packaged reader reproduces the failure.
Suggested upstream fix: use an unbuffered fd reader, a dedicated reader thread/queue, or another JSONL transport that owns its buffering; also use a less aggressive rate-limit timeout and surface the exception type/stderr in the record.
System details
- Omarchy: 4.0.2-1
- Codex CLI: 0.151.0 (installed via mise)
- Kernel: 7.1.9-arch1-2, x86_64
- Desktop: Hyprland 0.56.2 / Quickshell 0.3.1
- Hardware: Dell Latitude 7430, Intel Core i5-1235U, Intel Iris Xe
View raw text
## What happened
The `omarchy.agents` bar widget collects and renders Codex's local token stats, but the live subscription limits section shows:
```text
CODEX LIMITS UNAVAILABLE
account/rateLimits/read
```
The generated record contains an empty plan and limits array:
```json
{
"tierLabel": "",
"limits": [],
"usageStatusText": "Codex limits unavailable",
"authHelpText": "account/rateLimits/read"
}
```
This is distinct from the older `-a untrusted` reports. Omarchy 4.0.2-1 correctly launches Codex with `-a on-request`; `initialize` and `account/read` both succeed. Only `account/rateLimits/read` times out.
## Expected
The widget should display the authenticated Codex plan and its rate-limit windows.
## Steps to reproduce
1. Install and authenticate Codex CLI 0.151.0.
2. Run:
```bash
"$OMARCHY_PATH/bin/omarchy-agent-usage-update" --limits-only codex
jq '{tierLabel,limits,usageStatusText,authHelpText}' \
~/.local/state/omarchy/agents/usage/codex.json
```
3. Observe the empty fields shown above.
4. Speak the same JSONL protocol directly to `codex -s read-only -a on-request app-server`. The server successfully returns `initialize`, an unsolicited `remoteControl/status/changed` notification, `account/read`, and eventually a populated response for `account/rateLimits/read`.
## Root cause
There are two fragile parts in `bin/omarchy-agent-usage-codex`:
1. The rate-limit request has a hard-coded four-second deadline:
```python
limits_msg = rpc_request(proc, 3, "account/rateLimits/read", timeout=4)
```
The response takes longer on this otherwise working installation.
2. `rpc_request()` combines `select()` on a buffered `TextIOWrapper` with `readline()`:
```python
ready, _, _ = select.select([proc.stdout], [], [], 0.25)
line = proc.stdout.readline()
```
`readline()` may prefetch multiple JSONL messages into Python's user-space buffer. A later `select()` checks only the kernel file descriptor, so it can wait even though a complete response is already buffered. The app-server's unsolicited notification makes multiple interleaved lines normal rather than exceptional.
The thrown `TimeoutError(method)` is then rendered as the bare method name, which is why the panel shows `account/rateLimits/read` rather than a useful diagnostic.
## Verified workaround
A user-level override that made both changes fixed the widget:
- Read the subprocess fd with `os.read()` and maintain an explicit newline buffer, avoiding `TextIOWrapper`/`select()` desynchronization.
- Give `account/rateLimits/read` a 20-second timeout.
After that change, the same collector returns a populated plan and weekly rate-limit window. Reverting to the packaged reader reproduces the failure.
Suggested upstream fix: use an unbuffered fd reader, a dedicated reader thread/queue, or another JSONL transport that owns its buffering; also use a less aggressive rate-limit timeout and surface the exception type/stderr in the record.
## System details
- Omarchy: 4.0.2-1
- Codex CLI: 0.151.0 (installed via mise)
- Kernel: 7.1.9-arch1-2, x86_64
- Desktop: Hyprland 0.56.2 / Quickshell 0.3.1
- Hardware: Dell Latitude 7430, Intel Core i5-1235U, Intel Iris Xe
Validation
Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.
Linked
Not linked to any known issue, other report or change yet.
Decision
Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.
- Out of scopeDecided by agents · verified · 2026-10-09 10:46 UTC