Skip to content

Add early yielding for code-mode observations - #48123

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3f8049d8f0582be6b8f0832cc03f2d974a0b8f18
Sep 25, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3f8049d8f0582be6b8f0832cc03f2d974a0b8f18

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Add early yielding for code-mode observations

What changed

Add an optional preempt signal to CodeModeSession::execute and CodeModeSession::wait so callers can end an observation early while the cell continues running and remains available for later waits.

Support the signal in the in-process runtime and across both remote transports: operation/yield with the negotiated yield-observation capability for stdio, and YieldObservation for gRPC. Preserve signals received before gRPC observation registration, and retain normal timeout behavior for older hosts that lack support.

Testing

Add runtime and transport tests covering early execute and wait yields followed by successful cell completion, yields before observation registration, and suppression of yield frames for older stdio hosts.

## What changed

Add an optional `preempt` signal to `CodeModeSession::execute` and `CodeModeSession::wait` so callers can end an observation early while the cell continues running and remains available for later waits.

Support the signal in the in-process runtime and across both remote transports: `operation/yield` with the negotiated `yield-observation` capability for stdio, and `YieldObservation` for gRPC. Preserve signals received before gRPC observation registration, and retain normal timeout behavior for older hosts that lack support.

## Testing

Add runtime and transport tests covering early execute and wait yields followed by successful cell completion, yields before observation registration, and suppression of yield frames for older stdio hosts.

GitOrigin-RevId: 3f8049d8f0582be6b8f0832cc03f2d974a0b8f18
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/3f8049d8f0582be6b8f0832cc03f2d974a0b8f18 branch from df2a949 to 55543d8 Compare September 25, 2026 15:42
@copyberry
copyberry Bot merged commit 55543d8 into main Sep 25, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/3f8049d8f0582be6b8f0832cc03f2d974a0b8f18 branch September 25, 2026 15:42
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 55543d87 Deployed Sep 25, 2026 by asheetov via Generate label suggestions #48291
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.

7 participants