Repository navigation
feat(provider-claude-code): add Claude in Chrome setting - #2988
Merged
Merged
Conversation
Claude Code disables Claude in Chrome for SDK-spawned (headless) sessions even when the interactive CLI has it enabled by default, so bb threads never got the browser tools. Add a chromeEnabled provider setting (default off) that passes --chrome via SDK extraArgs. Changing it restarts the thread Claude process before the next turn with the same provider thread id, so context is kept.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
bb threads never got the Claude in Chrome browser tools, even when the interactive
claudeCLI had Chrome enabled by default. Claude Code (2.1.259) skips theclaudeInChromeDefaultEnableddefault in headless/SDK mode and only honors an explicit--chromeflag. Checked directly:claude -ploads 0 Chrome tools,claude -p --chromeconnects theclaude-in-chromeMCP server and loads 22 tools. bb never passed the flag.What changed
plugins/provider-claude-code/server.ts: newchromeEnabledboolean setting (default off) and its derived provider option.session-params.ts,bridge/commands.ts: carrychromeEnabledthrough thread start/resume/fork and turn start/steer params.bridge/session-options.ts,bridge/sdk-session.ts: when enabled, passextraArgs: { chrome: null }to the Agent SDK, which becomes--chromeon the Claude process.bridge/bridge.ts: a changed setting on a turn updates the attachment's session options and marks the resident session to restart before the next turn with the same provider thread id, so context is kept. A resume with a changed setting replaces the session through the existing construction-config comparison.docs/configuration.md, bb-cli skillreferences/configuration.md, and the providers guide template.HOST_DAEMON_PROTOCOL_VERSIONbump: the option rides inside the provider plugin'sproviderOptionsbag and plugin-internal bridge params, same asidleQueryReleaseEnabled(Add opt-in idle Claude query release #2808).How you verified
buildSessionOptionsemitsextraArgsonly when enabled; bridge test that a turn flippingchromeEnabledrestarts the Claude process withresumeset and emitssession/replaced; server test for the setting descriptor and derived option; session-params and thread-runtime-config assertions updated.pnpm exec turbo run typecheck --filter=bb-plugin-provider-claude-code --filter=@bb/serverclean.pnpm exec turbo run test --filter=bb-plugin-provider-claude-code --force: 25 files, 354 tests pass.@bb/serverthread-runtime-config.test.ts: 30 pass.claude -p --chrome --output-format stream-json --verboseon this host listsclaude-in-chromeas connected with 22mcp__claude-in-chrome__*tools; without the flag, none.