Skip to content

Prevent unread events from blocking in-process requests - #38381

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6ca6cfb9349dfa04a613236836f813c1f799783e
Aug 13, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6ca6cfb9349dfa04a613236836f813c1f799783e

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Prevent unread events from blocking in-process requests

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.

## 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
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/6ca6cfb9349dfa04a613236836f813c1f799783e branch from f00a07d to 6fc6b9d Compare August 13, 2026 13:58
@copyberry
copyberry Bot merged commit 6fc6b9d into main Aug 13, 2026
28 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/6ca6cfb9349dfa04a613236836f813c1f799783e branch August 13, 2026 13:59
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant