Skip to content

feat(provider-claude-code): add Claude in Chrome setting - #2988

Merged
SawyerHood merged 1 commit into
get-bb:mainfrom
smsunarto:scott/claude-in-chrome
Sep 3, 2026
Merged

SawyerHood merged 1 commit into
get-bb:mainfrom
smsunarto:scott/claude-in-chrome

Conversation

@smsunarto

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

bb threads never got the Claude in Chrome browser tools, even when the interactive claude CLI had Chrome enabled by default. Claude Code (2.1.259) skips the claudeInChromeDefaultEnabled default in headless/SDK mode and only honors an explicit --chrome flag. Checked directly: claude -p loads 0 Chrome tools, claude -p --chrome connects the claude-in-chrome MCP server and loads 22 tools. bb never passed the flag.

What changed

  • plugins/provider-claude-code/server.ts: new chromeEnabled boolean setting (default off) and its derived provider option.
  • session-params.ts, bridge/commands.ts: carry chromeEnabled through thread start/resume/fork and turn start/steer params.
  • bridge/session-options.ts, bridge/sdk-session.ts: when enabled, pass extraArgs: { chrome: null } to the Agent SDK, which becomes --chrome on 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: docs/configuration.md, bb-cli skill references/configuration.md, and the providers guide template.
  • No HOST_DAEMON_PROTOCOL_VERSION bump: the option rides inside the provider plugin's providerOptions bag and plugin-internal bridge params, same as idleQueryReleaseEnabled (Add opt-in idle Claude query release #2808).

How you verified

  • New tests: buildSessionOptions emits extraArgs only when enabled; bridge test that a turn flipping chromeEnabled restarts the Claude process with resume set and emits session/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/server clean.
  • pnpm exec turbo run test --filter=bb-plugin-provider-claude-code --force: 25 files, 354 tests pass. @bb/server thread-runtime-config.test.ts: 30 pass.
  • Manual: claude -p --chrome --output-format stream-json --verbose on this host lists claude-in-chrome as connected with 22 mcp__claude-in-chrome__* tools; without the flag, none.

AGENT GENERATED

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.
@SawyerHood
SawyerHood merged commit fee32f9 into get-bb:main Sep 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants