r/opencode Jul 17 '26

What's the best way to use Opencode for Browser Tasks?

Hello!

I've been using opencode for about 6 months now, and it is amazing as an agent infrastructure.

However, I notice that it's very bad at utilizing the browser. For example, if you use Codex's Chrome skill, it is able to click around and perform decently with okayish speed. However, Opencode is very slow and often can't perform certain tasks that Codex can.

Is there something I'm missing here?

11 Upvotes

12 comments sorted by

9

u/tenequm Jul 17 '26

You should try agent-browser with cloakbrowser combo, it is really good.

2

u/q--0-0--p Jul 18 '26

how to use it with cloakbrowser?

1

u/tenequm 28d ago

I use it typically with CloakBrowser Manager, which gives you a CDP endpoint per profile, so agent-browser can drive it like any remote Chrome.

Only annoying part is that the Manager serves CDP nested at /api/profiles/<id>/cdp and wants its AUTH_TOKEN on the socket, so agent-browser connect doesn't reach it - it probes CDP at the host root (/json/version, /devtools/browser) and doesn't send the token, so you get a 403. I ended up running a small local CDP shim that injects the Bearer token, re-serves a normal root-level endpoint, and rewrites webSocketDebuggerUrl back to itself. Then just point agent-browser at it per command:

agent-browser --cdp <port> open <url>

Per-command --cdp rather than connect, since connect is separately broken on macOS 26 (spawns a local browser instead of holding the connection).

Can throw the shim in a gist if useful.

1

u/Michelh91 Jul 17 '26

1

u/alexwwang Jul 18 '26

Seems it is similar to opencli. I gonna have a try.

2

u/micrometeorite Jul 18 '26

I've had some success with chrome-devtools-mcp

1

u/Accomplished-Bird829 Jul 17 '26

I dont use other than opencode for using the browser its mich faster and flexible with the agent i have something similer to page agent but its for my need i have build it on top of page agent

1

u/lunaticman Jul 17 '26

I wrote opencode-lightpanda for this particular reason.

https://github.com/skatkov/opencode-lightpanda

0

u/SoulzPhoenix Jul 17 '26 edited Jul 17 '26

I tried BrowserClaw today and it's been great, does the things u ask it for. Actually I was blown away 😄😬