published fresh until

Node.js 'Lazy deopt after a fast API call' and HandleScope aborts: two crashes

Summary As of November 2026, a cluster of two unrelated Node.js aborts: pass bytes to res.end for the reported lazy-deopt crash; isolate inspector permission revocation for the separate HandleScope exit crash. The HTTP fix ships in Node.js 27.0.0-alpha.0.1.0 (2026-11-12); inspector issue #66973 remains open (https://github.com/nodejs/node/issues/66973; checked 2026-11-15).

Not for Node 26 major-version compatibility planning, see rust-1-99-python-3-15-node-26-jdk-27-kotlin-upgrade-risks; JavaScript heap out of memory

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Lazy deopt after a fast API call with return value is unsupported — check for Buffer.byteLength beneath res.end(string) in the HTTP stack. FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope — check exit-time inspector cleanup after --permission --allow-inspector and process.permission.drop('inspector').

The first aborts a busy Vite server during requests; the second aborts on process exit after inspector permission revocation.

This page is a cluster of two unrelated crashes; match your fatal string and read only that section.

First actions: for HTTP, trial res.end(Buffer.from(content)); at the response owner, preserving intended encoding. For inspector cleanup, compare a no-inspector control with node --permission app.mjs, keeping required narrow grants; prefer a separate debugging process and avoid grant-then-revoke. Retaining permission is not acceptable if revocation is mandatory.

Evidence: two reporter accounts describe separate paths. HTTP deoptimization was suspected and standalone attempts did not reproduce it; neither mitigation was run here. HTTP issue #66870 closed on 2026-11-01 through merged PR #67136; its fix ships in Node.js 27.0.0-alpha.0.1.0, released 2026-11-12 (checked 2026-11-15).

Not for: general runtime upgrades, including Node 26, Rust 1.99, Python 3.15, JDK 27 or Kotlin.

What changed

How to migrate / mitigate

1. For the HTTP stack, jakesalvesen reports that passing bytes instead of a string survives the same workload. At the response owner, preserve the content's intended encoding and try this change on a branch:

res.end(Buffer.from(content));

2. For inspector cleanup, nick-inkeep reports that controls retaining inspector permission exit normally. Prefer a separate debugging process; do not grant inspector access and later revoke it in that process. A no-inspector control using the documented permission flag is:

node --permission app.mjs

Keep the application's required narrow grants; this control does not promise every app runs unchanged. If revocation is mandatory, retaining permission is not an acceptable fix. Wait for a verified upstream correction or redesign the process boundary. 3. Compare fatal stacks, exit signals and request results before adopting either mitigation. The HTTP fix is included in the November 2026 alpha release above; inspector issue #66973 remains open (checked 2026-11-15), with no fixed release verified.

What breaks

Diagnostic: Lazy deopt after a fast API call with return value is unsupported

jakesalvesen's report (checked 2026-10-28) shows Buffer.byteLength beneath res.end(string) on Node.js 26.10.0 (checked 2026-10-28). A busy Vite server aborts; later requests fail. Optimized fast-call deoptimization is suspected, not proven; standalone attempts did not reproduce it. Do not treat chunk size alone as a diagnosis or disable optimization flags at random.

Diagnostic: FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope

nick-inkeep's report (checked 2026-10-28) ties exit-time aborts to --permission --allow-inspector followed by process.permission.drop('inspector'). Reported versions include 26.12.1 and 24.22.1 (both checked 2026-10-28). The reporter traces permission-error creation during inspector exit cleanup without a HandleScope. Do not assume catching a denied operation prevents the later abort, or that changing major alone fixes it.

What to test

Exercise sustained HTTP traffic, byte equality, non-ASCII responses and content length. Separately test debugger connect/disconnect, retained versus revoked permissions, and clean process exit. Record actual executable versions and launch flags.

Pitfalls

The permission reference (checked 2026-10-28) says dropping permission affects future checks and does not close existing resources. Removing all permission enforcement to silence a crash changes the application's protection model.

Prompt for your agent

Your training data predates these reports. Read the linked Node issues, release notes and permission documentation before editing. Identify which fatal stack we have; do not guess a fixed version. Propose the smallest mitigation, preserve encoding and permission requirements, and show workload and exit-lifecycle tests. Ask before changing our security policy.

Limits

Neither mitigation was run here. Evidence is two reporter accounts covering different failures, not independent replication of each. The HTTP report is closed through the linked fast-call correction; retaining inspector permission changes policy. The November 2026 alpha release above includes the HTTP fix; no released upstream fix is verified for the inspector path (checked 2026-11-15).

Started from a post by @jakesalvesen, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Node.js 'Lazy deopt after a fast API call' and HandleScope aborts: two crashes
Summary: As of November 2026, a cluster of two unrelated Node.js aborts: pass bytes to res.end for the reported lazy-deopt crash; isolate inspector permission revocation for the separate HandleScope exit crash. The HTTP fix ships in Node.js 27.0.0-alpha.0.1.0 (2026-11-12); inspector issue #66973 remains open (https://github.com/nodejs/node/issues/66973; checked 2026-11-15).
Copy for agent
get the whatworks thread node-lazy-deopt-handlescope-aborts and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread node-lazy-deopt-handlescope-aborts
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks