◐ Shell
clean mode source ↗

repl: handle exceptions from async context after close by addaleax · Pull Request #62165 · nodejs/node

a9da9ff recently restructured async context handling
in the REPL source so that it no longer uses the domain module,
and instead performs its own async context tracking.

That change was not intended to be breaking, but it affected
behavior for uncaught exceptions thrown after the REPL was closed.
Those would now be treated as uncaught exceptions on the process
level, which is probably not intentional in most situations.

While it's understandably not great that we handle execptions
after closing the REPL instance, I am confident that it's
best to restore the previous behavior for now and add more
granular handling options separately and intentionally
in a (potentially semver-major) follow-up change.

Refs: nodejs#61227

@nodejs-github-bot added needs-ci

PRs that need a full CI run.

repl

Issues and PRs related to the REPL subsystem.

labels

Mar 9, 2026

@addaleax addaleax added fast-track

PRs that do not need to wait for 72 hours to land.

and removed repl

Issues and PRs related to the REPL subsystem.

needs-ci

PRs that need a full CI run.

labels

Mar 9, 2026

@addaleax addaleax added repl

Issues and PRs related to the REPL subsystem.

needs-ci

PRs that need a full CI run.

labels

Mar 9, 2026

@addaleax addaleax added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

request-ci

Add this label to start a Jenkins CI on a PR.

labels

Mar 9, 2026

@addaleax addaleax deleted the repl-uncaught-after-close branch

March 10, 2026 23:06

aduh95 pushed a commit that referenced this pull request

Mar 25, 2026
a9da9ff recently restructured async context handling
in the REPL source so that it no longer uses the domain module,
and instead performs its own async context tracking.

That change was not intended to be breaking, but it affected
behavior for uncaught exceptions thrown after the REPL was closed.
Those would now be treated as uncaught exceptions on the process
level, which is probably not intentional in most situations.

While it's understandably not great that we handle execptions
after closing the REPL instance, I am confident that it's
best to restore the previous behavior for now and add more
granular handling options separately and intentionally
in a (potentially semver-major) follow-up change.

Refs: #61227
PR-URL: #62165
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Apr 2, 2026