opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: desktop: load browser extensions into the managed browser (password manager autofill)

Open J-eremy opened this issue 2 months ago • 3 comments

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Allow loading Chromium browser extensions — most usefully a password manager such as Bitwarden or 1Password — into the browser attached by the OpenCode desktop app, so that sign-in in the Review pane can autofill like a normal browser.

Summary

The managed browser is Chromium-based and drives real sign-in flows, but nothing exposes extension loading, so users cannot autofill credentials when they are handed a sign-in page.

Environment

  • opencode version: opencode v2.0.11 on PATH; desktop-bundled CLI v2.0.20 (~/.config/ai.opencode.desktop/cli/2.0.20/opencode-cli --version)
  • OS: Linux 7.2.8-1-cachyos (linux x64), Arch-based (Omarchy)
  • Terminal: TERM=xterm-256color; TERM_PROGRAM and COLORTERM unset (desktop app, no host terminal)
  • Shell: /usr/bin/zsh
  • Install/channel: latest release — desktop build 2.0.20
  • Active plugins: none referenced in ~/.config/opencode/opencode.json; one file present at ~/.config/opencode/plugins/herdr-agent-state.js (not referenced by config)

Use case

A workflow that claims free games across several storefronts opens each store's sign-in page and hands it to the user in the Review pane, then continues once they confirm. Each sign-in means typing credentials by hand or pasting them from the desktop password manager, because the embedded browser has no autofill. The same applies to any agent task that pauses for the user to authenticate.

Requested behavior

  • A user-facing setting that loads unpacked extensions into the managed browser session — for example browser.extensions: ["./path/to/extension"] in opencode.json(c), or an equivalent documented option.
  • Loaded extensions should be available to every tab opened in the run, and ideally persist across runs.
  • Extension-host permissions should stay scoped to the browser session rather than the whole desktop app profile.

Current behavior

  • No extension support is exposed. The Tools → Browser capability list covers tabs and navigation, snapshots and search, clicking and form input, screenshots, file transfer, console and network inspection, performance traces, heap inspection, and Lighthouse audits — no extensions.
  • There is no corresponding config field for it.
  • ~/.config/ai.opencode.desktop/ — the Electron profile the embedded browser runs in — has no Extensions/ directory.
  • The browser runs embedded in the Electron app rather than as a standalone Chromium, so there is no launch command to which a --load-extension flag could be added.

Alternatives considered

  • Hand-off sign-in (current workaround): works, but is manual on every site.
  • A separate browser that supports extensions: works for the user, but the agent cannot drive that browser, so the workflow still splits across two apps.
  • Electron session.loadExtension(): available to the app, not surfaced to users.

Additional context

Extension loading should be user-configured only, not agent-settable — an agent able to inject arbitrary extensions into a browser it also drives would be a meaningful supply-chain and credential-theft risk. A deny-by-default setting that the agent cannot modify would keep the safe hand-off workflow intact while letting the user opt their own password manager in.

J-eremy avatar Oct 01 '26 03:10 J-eremy

I think it should come built-in with ublock as the internet is dangerous and misleading for research agents without it and allow the agent to install and develop its own extension.

Credentials should be handled with chromium's native password manager to keep each session's secrets in isolated profiles.

shaplyd avatar Oct 09 '26 09:10 shaplyd

Thanks for the detailed request, @J-eremy!

To restate it: you'd like a setting, editable only by the user, that loads unpacked Chromium extensions (such as a password manager like Bitwarden or 1Password) into the desktop app's managed browser. Sign-in pages handed to you in the Review pane could then autofill, and the extensions would stay scoped to that browser session.

Right now the managed browser has no extension support, so this is new functionality rather than a bug. It also can't be done as an OpenCode plugin today, because plugins can't reach the desktop app's embedded browser session. Maintainers will consider it. Your point that this must stay out of the agent's reach is noted.

opencodejr[bot] avatar Oct 28 '26 01:10 opencodejr[bot]

This was fixed in #63002, which adds extension support to the desktop browser (store installs and unpacked folders, kept across restarts). Password manager sign-in may still be rough, please open a new issue for that if it doesn't work for you. If you still see this on the latest version, comment here and we'll reopen.

neriousy avatar Nov 23 '26 11:11 neriousy