Skip to content

Comments

Support external browser containers by connecting via CDP#152

Draft
hotzen wants to merge 1 commit intospacedriveapp:mainfrom
hotzen:external-browser
Draft

Support external browser containers by connecting via CDP#152
hotzen wants to merge 1 commit intospacedriveapp:mainfrom
hotzen:external-browser

Conversation

@hotzen
Copy link
Contributor

@hotzen hotzen commented Feb 22, 2026

Add connect_url to BrowserConfig so agents can connect to an external chromedp/headless-shell container via CDP instead of launching a local Chrome process.

  • Workers share the container (one tab each);
  • Browser Cntainer is managed externally, e.g. Docker Compose.

Config (src/config.rs)

  • Added connect_url: Option to BrowserConfig
  • handle_launch() branches: Browser::connect() for external, Browser::launch() for local
  • handle_close() drops the struct without sending CDP Browser.close for external browsers (sending it would kill the shared sandbox and all other workers' tabs)

Docs (docs/docker.md)

  • Added "External Browser" section with compose examples: host+Docker, both-in-Docker, per-agent dedicated sandboxes

@jamiepine
Copy link
Member

Woah! Love this

@hotzen hotzen force-pushed the external-browser branch 2 times, most recently from e1a2929 to 85ff033 Compare February 23, 2026 23:12
@hotzen
Copy link
Contributor Author

hotzen commented Feb 23, 2026

next: testing

@hotzen hotzen changed the title External browser Support external browser containers by connecting via CDP Feb 23, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hotzen
Copy link
Contributor Author

hotzen commented Feb 24, 2026

generally works.

issues with screenshots vs. docker though, need to fix:

message=executed tool file with args {"operation":"read","path":"/home/xxx/.spacebot/agents/main/data/screenshots/screenshot_20260224_221337_957.png"}. result: Toolset error: ToolCallError: ToolCallError: ToolCallError: File operation failed: ACCESS DENIED: Path is outside the workspace..

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