Skip to content

Make code-mode exit() stop the entire cell - #52748

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Make code-mode exit() stop the entire cell

Why

A catchable exception lets JavaScript continue after exit(), including in catch, finally, and queued promise callbacks. Exiting should finish the cell successfully without further output or state changes.

What changed

  • Terminate V8 execution when exit() is called and complete the cell even if its module promise remains pending.
  • Guard host callbacks against effects after exit, including when getters or value conversion request exit.
  • Preserve stored writes made before exit and suppress errors when exit occurs during exception formatting.

Testing

Add regression tests for synchronous and asynchronous exit, timers, parallel promises, value conversion, exception getters, and resuming after a yield and tool response. Verify that only prior output and stored writes survive, and separately exercise host guards while JavaScript continues running.

## Why

A catchable exception lets JavaScript continue after `exit()`, including in `catch`, `finally`, and queued promise callbacks. Exiting should finish the cell successfully without further output or state changes.

## What changed

- Terminate V8 execution when `exit()` is called and complete the cell even if its module promise remains pending.
- Guard host callbacks against effects after exit, including when getters or value conversion request exit.
- Preserve stored writes made before exit and suppress errors when exit occurs during exception formatting.

## Testing

Add regression tests for synchronous and asynchronous exit, timers, parallel promises, value conversion, exception getters, and resuming after a yield and tool response. Verify that only prior output and stored writes survive, and separately exercise host guards while JavaScript continues running.

GitOrigin-RevId: e9487ba65ef0358612c5009bd26953b786a12798
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/e9487ba65ef0358612c5009bd26953b786a12798 branch from c1e5d46 to 1652992 Compare October 10, 2026 02:14
@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-10T02:14:27.426564Z c1e5d46 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 1652992 into main Oct 10, 2026
17 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/e9487ba65ef0358612c5009bd26953b786a12798 branch October 10, 2026 02:14
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 10, 2026
@Robthejob13
Robthejob13 deployed to issue-triage October 10, 2026 02:31 — with Image GitHub Actions Active
@Robthejob13
Robthejob13 deployed to issue-triage October 10, 2026 02:31 — with Image GitHub Actions Active
@Robthejob13
Robthejob13 deployed to issue-triage October 10, 2026 02:31 — with Image GitHub Actions Active
@zhzryqsl
zhzryqsl deployed to issue-triage October 10, 2026 02:34 — with Image GitHub Actions Active
@zhzryqsl
zhzryqsl deployed to issue-triage October 10, 2026 02:34 — with Image GitHub Actions Active
@zhzryqsl
zhzryqsl deployed to issue-triage October 10, 2026 02:34 — with Image GitHub Actions Active
@s520145
s520145 deployed to issue-triage October 10, 2026 02:54 — with Image GitHub Actions Active
@s520145
s520145 deployed to issue-triage October 10, 2026 02:54 — with Image GitHub Actions Active
@s520145
s520145 deployed to issue-triage October 10, 2026 02:54 — with Image GitHub Actions Active
@s520145
s520145 deployed to issue-triage October 10, 2026 02:55 — with Image GitHub Actions Active

This branch was successfully deployed

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

8 participants