Repository navigation
Conversation
|
Verified: No actionable defect found in the scoped review of
The batched case in the added test targets the reproduced failure: buffered Review informationTest scope: Source inspection and isolated execution of both collector revisions with synthetic backends. No live Codex/account access, panel UI validation, or full-suite rerun; the reported live Codex 0.156 results were not independently verified. Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review. Automated AI review: Astra Medium performed initial inspection and synthesis; Opus 5.5 High and GPT 6 Sol Xhigh completed independent technical reviews. Claims were checked against source and retained targeted evidence, followed by a separate Astra Medium editorial check. |
|
Tested in the Omarchy VM (Omarchy 4.0.4 / Python 3.14):
Works as expected! |
) Codex CLI 0.156 writes notifications (remoteControl/status/changed, account/updated) and the RPC reply in a single stdout chunk. Omarchy's packaged collector selects on the pipe, then calls readline(), which pulls the whole chunk into Python's buffer and returns only the first line. The next select() waits on an empty pipe while the reply sits in that buffer, so account/read times out and the panel shows "Codex limits unavailable" with "account/read" underneath, for a healthy ChatGPT login. Add a third patch to omarchy-agent-usage-codex-compat that reads raw bytes into a buffer kept on the process and drains complete lines before waiting on the pipe. It mirrors the upstream fix in omacom/omarchy#12979 (issue #10143) but replaces only rpc_request's body, so the call sites stay untouched, and like the other patches it is skipped once Omarchy ships the fix. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Verified locally on Omarchy 4.0.4-1 / codex-cli 0.157.1 (Linux x86_64). Applied the transport changes from this PR to a user-owned copy of the installed collector, leaving the original 4-second account/limits deadlines unchanged:
Before the fix, instrumentation at the original timeout boundary proved that the matching successful response (id 2) was already in the Python text buffer while the kernel fd was not readable and the server was still running. Details: #13080 (comment) Scope: local transport probes, live collector, and panel verification; I did not run this PR’s full repository test suite. |
|
Follow-up to my earlier verification: the reader fix is present and matches this PR, but the unchanged 4s deadlines still cause independent intermittent failures. Captured an actual widget refresh after applying the reader fix. Two local patched collector processes logged successful account/read responses in 2.048s and 3.050s, then timed out on account/rateLimits/read at 4.005s and 4.004s. At each timeout the explicit receive buffer was empty and the app-server was still running. The generated failure timestamps matched the widget’s codex.json, ruling out an unpatched writer for this captured failure. With an extended observation deadline, real successful account/read responses arrived at 7.769s and 7.783s, and one rate-limits response arrived at 4.215s. Thus account/read, not only rateLimits/read, can legitimately exceed the current 4s budget here. This is distinct from the buffered-reader race fixed by this PR and consistent with #10143. A user-local follow-up allowing 20s for both account RPCs passed delayed-account/delayed-limits collector regression cases and four real widget refreshes (8.25–10.44s total). No retries or stale-data fallback were added. This does not invalidate the reader fix; it narrows my earlier successful live-test claim, which did not exercise the later slow-response condition. |
|
Verified on The race is deterministic, not intermittent, on 4.0.4. The app-server answers Because the collector reports Reproduce against the installed collector: # verbatim rpc_request() from bin/omarchy-agent-usage-codex @ 4.0.4
p = subprocess.Popen(["codex","-s","read-only","-a","on-request","app-server"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL, text=True)
rpc_request(p, 1, "initialize", {"clientInfo": {"name": "t", "version": "1"}}, timeout=8)
# reads: initialize result, remoteControl/status/changed, account/updated
rpc_request(p, 2, "account/read", timeout=4)
# TimeoutError: account/readSending both requests up front, or reading the stream without {"account": {"type": "chatgpt", "email": "...", "planType": "pro"}}
{"rateLimits": {"primary": {"usedPercent": 1, "windowDurationMins": 10080, "resetsAt": ...}}}With the reader fixed, One note on the 4s deadlines in this PR: with the reader fixed, Also relevant: #13059 fixes the other half of the report — the bare method name shown to the user. Worth landing together, since #13059's clearer message is what makes this diagnosable at all. |
Codex 0.156 can send notifications and an RPC reply in the same stdout chunk.
readline()buffers the reply, but the nextselect()only checks the pipe. The collector then times out onaccount/readand the panel shows an "account/read" error despite having received the answer.Read raw bytes into a shared buffer and consume complete lines before waiting on the pipe. Partial replies still respect the request timeout.
Validation:
./test/all: CLI suite passes. Seven shell test files fail, all reproduced on clean upstream:config,kernel-headers-migration,omarchy-kernel-migration,runtime-smoke,screenshot-sanity,snapper, andunowned-system-paths. Three other files report skipped checks.