Skip to content

Avoid buffering replay-irrelevant thread notifications - #34222

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5b3414f1db7f3ae1feea4fe6c0275e4a7a1a4174
Jul 19, 2026
Merged

Avoid buffering replay-irrelevant thread notifications#34222
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/5b3414f1db7f3ae1feea4fe6c0275e4a7a1a4174

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 19, 2026

Copy link
Copy Markdown

Avoid buffering replay-irrelevant thread notifications

Why

Raw response items, realtime audio, and other notifications that the TUI does
not consume during replay can carry large payloads. Retaining them in each
thread's replay buffer wastes memory and can evict useful buffered events.

What changed

  • Skip replay buffering for notification types that are handled before routing
    or ignored during replay, while still updating turn and approval state.
  • Borrow notifications when recording events for an active thread so routing
    does not require an extra clone.

Testing

Add coverage that repeatedly sends large MCP progress and realtime audio
notifications and verifies that the replay buffer, pending approval, and active
turn state remain intact.

## Why

Raw response items, realtime audio, and other notifications that the TUI does
not consume during replay can carry large payloads. Retaining them in each
thread's replay buffer wastes memory and can evict useful buffered events.

## What changed

- Skip replay buffering for notification types that are handled before routing
  or ignored during replay, while still updating turn and approval state.
- Borrow notifications when recording events for an active thread so routing
  does not require an extra clone.

## Testing

Add coverage that repeatedly sends large MCP progress and realtime audio
notifications and verifies that the replay buffer, pending approval, and active
turn state remain intact.

GitOrigin-RevId: 5b3414f1db7f3ae1feea4fe6c0275e4a7a1a4174
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/5b3414f1db7f3ae1feea4fe6c0275e4a7a1a4174 branch from 4187d7a to d0516cf Compare July 19, 2026 20:13
@copyberry
copyberry Bot merged commit d0516cf into main Jul 19, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/5b3414f1db7f3ae1feea4fe6c0275e4a7a1a4174 branch July 19, 2026 20:14
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant