Files
codex/codex-rs/app-server-client/src
Tamir Duberstein 6fc6b9d6d2 Prevent unread events from blocking in-process requests (#38381)
## Why

Awaiting a bounded consumer event queue can stall the in-process app-server
worker when notifications are not being drained, preventing it from delivering
a request response queued behind them.

## What changed

- Use an unbounded queue for caller-facing in-process events while keeping
  command and embedded-runtime queues bounded.
- Preserve all events in order instead of dropping best-effort events and
  emitting lag markers when the consumer queue fills.
- Document that callers can await requests without concurrently draining
  notifications.

## Testing

Add a regression test that fills a capacity-one client with unread settings
notifications, verifies subsequent requests complete, and then confirms the
notifications remain readable in order.

GitOrigin-RevId: 6ca6cfb9349dfa04a613236836f813c1f799783e
2026-08-13 13:57:25 +00:00
..