Skip to content

Report exec runtime resets before accepting further requests - #52825

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/914cab3bb45e30a3f3b2afacb5631e42b18e21b0
Oct 10, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/914cab3bb45e30a3f3b2afacb5631e42b18e21b0

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Report exec runtime resets before accepting further requests

Why

Replacing a gRPC code-mode runtime loses stored values and running cells. Silently continuing after reconnection hides that loss, while prior external tool operations may already have completed.

What changed

  • Capture the runtime generation when execute and wait calls are created. If recovery replaces it, reject those calls with an explicit reset error, including concurrent calls and calls first polled after recovery.
  • Explain the lost state and advise inspecting prior tool results before retrying. Allow a fresh exec call to continue on the replacement runtime.
  • Keep terminate from reopening the runtime so cleanup cannot hide a reset from the next request.

Testing

Extend gRPC recovery tests to cover reset errors after host restarts, missing sessions, and route loss, rejection of queued calls, and successful fresh execution with cleared stored state.

## Why

Replacing a gRPC code-mode runtime loses stored values and running cells. Silently continuing after reconnection hides that loss, while prior external tool operations may already have completed.

## What changed

- Capture the runtime generation when `execute` and `wait` calls are created. If recovery replaces it, reject those calls with an explicit reset error, including concurrent calls and calls first polled after recovery.
- Explain the lost state and advise inspecting prior tool results before retrying. Allow a fresh `exec` call to continue on the replacement runtime.
- Keep `terminate` from reopening the runtime so cleanup cannot hide a reset from the next request.

## Testing

Extend gRPC recovery tests to cover reset errors after host restarts, missing sessions, and route loss, rejection of queued calls, and successful fresh execution with cleared stored state.

GitOrigin-RevId: 914cab3bb45e30a3f3b2afacb5631e42b18e21b0
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/914cab3bb45e30a3f3b2afacb5631e42b18e21b0 branch from 2b7618b to 806d973 Compare October 10, 2026 08:51
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-10T08:51:33.546049Z 2b7618b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 806d973 into main Oct 10, 2026
1 check failed
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/914cab3bb45e30a3f3b2afacb5631e42b18e21b0 branch October 10, 2026 08:51
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 10, 2026
@khalkedev
khalkedev deployed to issue-triage October 10, 2026 08:59 — with Image GitHub Actions Active
@khalkedev
khalkedev deployed to issue-triage October 10, 2026 08:59 — with Image GitHub Actions Active
@khalkedev
khalkedev deployed to issue-triage October 10, 2026 08:59 — with Image GitHub Actions Active
@yan-006
yan-006 deployed to issue-triage October 10, 2026 08:59 — with Image GitHub Actions Active
@yan-006
yan-006 deployed to issue-triage October 10, 2026 08:59 — with Image GitHub Actions Active
@yan-006
yan-006 deployed to issue-triage October 10, 2026 08:59 — with Image GitHub Actions Active
@yan-006
yan-006 deployed to issue-triage October 10, 2026 09:00 — with Image GitHub Actions Active
@balveer767
balveer767 deployed to issue-triage October 10, 2026 09:01 — with Image GitHub Actions Active
@balveer767
balveer767 deployed to issue-triage October 10, 2026 09:01 — with Image GitHub Actions Active
@balveer767
balveer767 deployed to issue-triage October 10, 2026 09:01 — with Image GitHub Actions Active
@YKMSKY
YKMSKY deployed to issue-triage October 10, 2026 09:07 — with Image GitHub Actions Active
@YKMSKY
YKMSKY deployed to issue-triage October 10, 2026 09:07 — with Image GitHub Actions Active
@OsTyler
OsTyler deployed to issue-triage October 10, 2026 09:29 — with Image GitHub Actions Active
@OsTyler
OsTyler deployed to issue-triage October 10, 2026 09:29 — with Image GitHub Actions Active
@OsTyler
OsTyler deployed to issue-triage October 10, 2026 09:29 — with Image GitHub Actions Active
@OsTyler
OsTyler deployed to issue-triage October 10, 2026 09:30 — with Image GitHub Actions Active
@lk251
lk251 deployed to issue-triage October 10, 2026 09:32 — with Image GitHub Actions Active
@lk251
lk251 deployed to issue-triage October 10, 2026 09:32 — with Image GitHub Actions Active
@lk251
lk251 deployed to issue-triage October 10, 2026 09:32 — with Image GitHub Actions Active
@pranaysai27
pranaysai27 deployed to issue-triage October 10, 2026 10:14 — with Image GitHub Actions Active
@pranaysai27
pranaysai27 deployed to issue-triage October 10, 2026 10:14 — with Image GitHub Actions Active
@pranaysai27
pranaysai27 deployed to issue-triage October 10, 2026 10:14 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 806d9732 Deployed Oct 10, 2026 by chesha1 via Identify potential duplicates (open issues fallback) #54152
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.