Repository navigation
Labels
connectBuilt-in plugin: connectpartial-reproBug partially reproduced; some claims unverified; see linked reportpluginsPlugin SDK, runtime, marketplace
Description
Summary
Uncaught exception [using Opencode provider]:
plugin \"connect\" used a stale API handle — it was reloaded or disabled
Full error:
{
"diagnosticVersion": 1,
"kind": "uncaughtException",
"processName": "server",
"occurredAt": "2026-11-26T13:13:30.128Z",
"pid": 3340763,
"runtime": {
"nodeVersion": "v22.23.5",
"platform": "linux",
"arch": "x64",
"execPath": "/usr/bin/node"
},
"error": {
"name": "PluginContextStaleError",
"message": "plugin \"connect\" used a stale API handle — it was reloaded or disabled; re-entry happens via a fresh factory call",
"stack": "PluginContextStaleError: plugin \"connect\" used a stale API handle — it was reloaded or disabled; re-entry happens via a fresh factory call\n at stale (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/start-server.js:207217:20)\n at assertLive (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/start-server.js:207221:28)\n at get loopbackBaseUrl (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/start-server.js:207576:7)\n at Object.getLoopbackBaseUrl (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/builtin-plugins/connect/dist/server.js?bbPluginLoad=32.32:35:36738)\n at mt.resolveStreamOrigin (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/builtin-plugins/connect/dist/server.js?bbPluginLoad=32.32:35:31189)\n at Object.resolveOrigin (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/builtin-plugins/connect/dist/server.js?bbPluginLoad=32.32:35:34287)\n at Me.executeHttp (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/builtin-plugins/connect/dist/server.js?bbPluginLoad=32.32:35:23782)\n at Me.onFrame (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/builtin-plugins/connect/dist/server.js?bbPluginLoad=32.32:35:22045)\n at r.<anonymous> (file:///home/snrs/.bb/app-versions/0.50.1/node_modules/bb-app/server/dist/builtin-plugins/connect/dist/server.js?bbPluginLoad=32.32:35:20581)\n at r.emit (node:events:519:28)"
}
}
Versions and environment
bb 0.50.1 (desktop app, server on ubuntu 24.04)
Steps to reproduce
reload the plugin during a request
-
Open a large thread in the web interface (thousands of events) so that the
/api/v1/threads/<id>/timelinerequest runs for several seconds. -
While it is loading, run:
bb plugin reload connect -
Watch the logs:
grep -E "stale API handle|event loop stalled" ~/.bb/logs/server.*.log ls -lt ~/.bb/logs/process-server-uncaughtException-*.json | head
You should see:
[plugin:connect] service tunnel raised an uncaught exception from a stopped run:
plugin "connect" used a stale API handle — it was reloaded or disabled
and a process-server-uncaughtException-*.json file with a PluginContextStateError stack. The server will restart, and all chats will show "host daemon disconnected".
Expected vs actual
clear error message with a suggestion for how to fix it
Evidence
No response
What you ruled out
No response
Suggested priority and effort (optional)
Low
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
Metadata
Metadata
Assignees
Labels
connectBuilt-in plugin: connectpartial-reproBug partially reproduced; some claims unverified; see linked reportpluginsPlugin SDK, runtime, marketplace

Activity
bb-slop-cop commentedon Nov 26, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotplugins,connect.partial-repro.Detach disposed tunnel session socket listeners (#8259)
Detach disposed tunnel session socket listeners (get-bb#8259)