Skip to content

desktop: in-app browser option for shared/persistent profile (cookies lost across sessions and restarts) #63372

Closed as duplicate

Description

@Nickz22

Summary

The desktop in-app browser gives each browser pane a random, non-persistent Electron partition (opencode-browser-${crypto.randomUUID()}). Cookies and logins are therefore not shared across sessions and are lost on app restart, so users must re-authenticate to the same sites (SSO, Salesforce, GitHub, etc.) repeatedly. Request: an option for a shared and/or persistent browser profile.

Environment

  • opencode version: desktop 2.2.7 (bundled CLI reports 1.17.18)
  • OS: Darwin 25.6.0 arm64 (macOS)
  • Terminal: N/A (desktop app)
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: none found in config

Reproduction

  1. In the desktop app, open a browser tab in session A and log in to a site.
  2. Open a browser tab in session B (same window) and visit the same site — logged out.
  3. Restart the app; restored tabs in session A are also logged out.

Expected Behavior

An opt-in way to keep logins, e.g.:

  • a config/setting to use a persistent partition (persist:opencode-browser) shared across sessions, or
  • per-project/per-workspace persistent profiles, or
  • import/sync of cookies from a named profile.

Default isolation can stay as-is; this would be opt-in.

Actual Behavior

In out/main/pane-*.js the pane registration creates:

v = `opencode-browser-${crypto.randomUUID()}`
Dt.session.fromPartition(v)

Without the persist: prefix the partition is in-memory, and the random UUID isolates every pane. Tab URLs are restored (opencode.browser.dat), but session state is not.

Additional Context

  • Consistently reproducible.
  • Workarounds: keep all authenticated browsing in a single session; use one-time login URLs (e.g. sf org open --url-only); use an external browser automation tool with a persistent profile.
  • Security note: a persistent shared profile should remain opt-in, since agents can drive these tabs.

Activity

  1. opencodejr commented on Nov 11, 2026

    @opencodejr
    Contributor

    Thanks for the clear write-up and for tracking down the exact cause.

    I think this is a duplicate of #60313. The current code still gives each browser pane its own random partition with no persist: prefix, so cookies only live in memory. That's why logins don't carry over between sessions or survive a restart.

    Possible duplicates and related issues, ordered by likelihood:

    I'm closing this issue now as a duplicate of #60313. Please add your details there, especially your points about making it opt-in and the security concern about agents driving logged-in tabs, since they're useful for the design in #63002. If you think this is a different problem, reply here and the issue will be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions