You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The host daemon runtime expects each provider stdout line to be valid JSON-RPC. Because the line no longer starts with JSON, the runtime drops it before the Pi adapter sees it.
Disabling the specific stdout-writing notification extension makes Pi threads complete normally again, but that is only a workaround.
I would like to propose this fix: take the raw stdout writer for bridge send(), and trash ordinary process.stdout.write / extension output to stderr while running the bridge.
This matches the same kind of stdout-protection pattern Pi uses for structured output modes.
Pi’s own structured-output modes use an output guard (core/output-guard, functions takeOverStdout() / writeRawStdout()). It captures the raw stdout writer for protocol frames, then redirects ordinary process.stdout.write calls to stderr so
extensions/logging cannot corrupt the JSON/RPC stdout stream. BB’s Pi bridge likely needs the same invariant because its stdout is also a JSON-RPC transport.
I would like to work on this issue and make my first contribution for bb!
The auto reviewer left some feedback that you can address if you want otherwise I can. tbh I think it is being a little too picky this is still better than the state main is in right now.
Also @raincodes64 if you run into any other pi issues feel free to file and open PRs for them. Michael and myself are not daily pi users so any contributions to make it more stable are welcome
Activity
SawyerHood commentedon Aug 8, 2026
Do you have any pi extensions installed?
raincodes64 commentedon Aug 8, 2026
Hi, I've encountered the same bug , I've been investigating this and yes, they're caused by extensions.
Extensions polluting the stdout specifically, which bb expects to be a valid json/rpc
In my case a Pi Notification Extension emitted an OSC 777 desktop-notification escape sequence on
agent_end:That was written immediately before BB’s bridge JSON-RPC notification on the same stdout line:
The host daemon runtime expects each provider stdout line to be valid JSON-RPC. Because the line no longer starts with JSON, the runtime drops it before the Pi adapter sees it.
Disabling the specific stdout-writing notification extension makes Pi threads complete normally again, but that is only a workaround.
I would like to propose this fix: take the raw stdout writer for bridge send(), and trash ordinary process.stdout.write / extension output to stderr while running the bridge.
This matches the same kind of stdout-protection pattern Pi uses for structured output modes.
Pi’s own structured-output modes use an output guard (
core/output-guard, functionstakeOverStdout()/writeRawStdout()). It captures the raw stdout writer for protocol frames, then redirects ordinaryprocess.stdout.writecalls to stderr soextensions/logging cannot corrupt the JSON/RPC stdout stream. BB’s Pi bridge likely needs the same invariant because its stdout is also a JSON-RPC transport.
I would like to work on this issue and make my first contribution for bb!
SawyerHood commentedon Aug 8, 2026
@raincodes64 please be my guest and open a PR for it!
raincodes64 commentedon Aug 8, 2026
I was already on it, please let me know if I missed any standards to follow (or anything else!)
SawyerHood commentedon Aug 8, 2026
The auto reviewer left some feedback that you can address if you want otherwise I can. tbh I think it is being a little too picky this is still better than the state main is in right now.
TY for the contribution!
SawyerHood commentedon Aug 8, 2026
Also @raincodes64 if you run into any other pi issues feel free to file and open PRs for them. Michael and myself are not daily pi users so any contributions to make it more stable are welcome
raincodes64 commentedon Aug 8, 2026
Sure!
fix(pi): protect bridge JSON-RPC stdout (get-bb#1208)
fix(pi): protect bridge JSON-RPC stdout (get-bb#1208)