Repository navigation
Handle interleaved Codex RPC notifications without timing out (#13773) - #13816
szaidi-code wants to merge 1 commit into
Conversation
Independent community review
Tested: Threaded RPC response pump, queue consumption timeouts, batched socket writes, and test suite execution in an isolated Omarchy test VM environment. Findings & Feedback:
Testing details
|
|
Triage note, tested 2026-10-01 against
Separately, #13733 already covers #13458 (longer timeout) and #13464 ( |
|
Triage (not posted): Prefer #13703 for #13773. This PR and #13703 both target the Codex app-server race where a reply arrives in the same write as a notification. Community testing against If maintainers want the queue/thread reader approach instead of #13703’s raw-fd + pending buffer, please rebase and add a test that fails on current |
Closes #13773
Summary
When Codex CLI sends notifications (such as
remoteControl/status/changedoraccount/updated) in the same buffer stream followinginitialize, Python buffered text I/O reads the lines into memory. The subsequentselect.select()on the underlying OS file descriptor reported not ready, leadingrpc_requestto miss replies already in memory and time out with "Codex limits unavailable".Changes
select.select()on bufferedproc.stdoutwith a dedicated queue-based thread reader and deadline timeout inbin/omarchy-agent-usage-codex.test/shell.d/agent-usage-codex-scanner-test.shasserting limits are read when notifications are interleaved.