denoland/deno · error
REPL thread error: {}
Error message
REPL thread error: {} What it means
The Jupyter kernel runs a REPL session on a background OS thread while the main worker serves ZMQ. When that thread finishes by returning Err (any error escaping the REPL session — evaluation infrastructure failure, stdio problem, initialization error), the main thread joins it and re-raises the inner error with this 'REPL thread error' prefix.
Source
Thrown at cli/tools/jupyter/mod.rs:259
});
op_state.put(KernelIsolateHandle {
handle: isolate_handle,
});
op_state.put(KernelConnectionInfo { json: conn_file });
}
// Bootstrap the JS ZMQ kernel then run the event loop.
kernel_worker.execute_script_static(
located_script_name!(),
"Deno[Deno.internal].startJupyterKernel();",
)?;
let mut kernel_main = kernel_worker.into_main_worker();
kernel_main.run_event_loop(false).await?;
// Wait for the REPL thread to finish.
match repl_thread.join() {
Ok(Ok(())) => {}
Ok(Err(e)) => bail!("REPL thread error: {}", e),
Err(_) => bail!("REPL thread panicked"),
}
Ok(())
}
// ------------------------------------------------------------------
// REPL session wrapper running on the background thread
// ------------------------------------------------------------------
struct JupyterReplSession {
repl_session: repl::ReplSession,
rx: mpsc::UnboundedReceiver<JupyterReplRequest>,
}
impl JupyterReplSession {
async fn start(&mut self) {
let mut poll_worker = true;View on GitHub (pinned to 9ad36f7a2c)
Solutions
- Restart the Jupyter kernel (Kernel -> Restart) — most REPL-thread failures are one-off
- Update Deno to the latest patch release (jupyter integration fixes land regularly)
- If it reproduces, capture the inner error text after 'REPL thread error:' and report it at github.com/denoland/deno/issues with the notebook cell that triggered it
Defensive patterns
Strategy: retry
Try / catch
Treat kernel death ('REPL thread error: ...') in clients as session-level failure: restart the kernel process and re-execute the notebook; surface the inner error text to the user for diagnosis. Prevention
- Keep notebooks' kernel sessions short; restart kernels periodically on long sessions
- Update Deno and jupyter-related packages together
- Save notebooks often — kernel thread errors end the session
When it happens
Trigger: The REPL session thread exits via Err: failures in ReplSession setup, a crashed eval loop, or an I/O error on the thread's channels. The kernel's event loop ran (run_event_loop completed), then repl_thread.join() returned Ok(Err(e)).
Common situations: Notebook sessions dying mid-use; Deno/Jupyter version mismatches after an upgrade; resource exhaustion in long-running kernels.
Related errors
- REPL thread panicked
- REPL thread failed to start
- Deno kernel already exists at {}, run again with `--force` t
- ERR_INVALID_REPL_INPUT
- ERR_MISSING_ARGS
AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20).
Data as JSON: /api/errors/18e292af414f1813.
Report an issue: GitHub.