Skip to main content
Blitz
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

049 · Browser profiles

Browser profiles: the sign-ins (OAuth, single sign-on, a site’s own) the agents browse with, one chosen per workspace (spec_049_browser_profiles)

Status Built (v0.8.4, the owner’s request: “research if we can expose the profile features of Chromium, since we want to take advantage of OAuth and other web protocols and authentications”; one profile per workspace, the owner’s choice 2026-10-23)
Source pkg/config/browserprofiles.go, pkg/engine/browser/browser.go (Options.ProfileDir), pkg/engine/tools/browser.go (syncProfile, webRules), browserProfile in pkg/engine/workspace.go, pkg/service/server/browserprofiles.go, ConfigService.*BrowserProfile* in proto/blitz/v1/config.proto; the page’s BrowserSettings.tsx and WorkspaceSettingsForm.tsx; the Electron app’s SignInWindow (apps/electron/src/main.ts)
Tests pkg/config/browserprofiles_test.go, pkg/engine/browser/launch_test.go (TestLaunchWithAKeptProfile), pkg/engine/tools/browser_test.go (TestBrowserToolUsesTheWorkspacesProfile), pkg/service/server/browserprofiles_test.go, apps/desktop/web/src/BrowserSettings.test.ts, apps/electron/src/logic.test.ts
Depends on spec_008_web (the browser, WEB-30–38), spec_038_electron (the window), spec_031_project_config (trust)

1. Purpose and what the research found

The agent’s browser had a throwaway profile, deleted on close (WEB-30), so it was signed in nowhere, and the user’s own sign-ins (a mailbox, a wiki behind SSO, a dashboard) were out of its reach.

  • Chromium keeps sign-ins in a profile: cookies, local storage, IndexedDB. A --user-data-dir kept between runs keeps them for the system’s Chrome; Electron’s session.fromPartition("persist:<name>") is the same for the app’s own views.
  • The user’s everyday Chrome profile is out of reach: Chrome 136 and later refuse --remote-debugging-port on the default profile, and its cookies are encrypted with the OS keychain. Profiles are Blitz’s own, signed in to by hand.
  • Google (and some others) refuse sign-in in embedded or automated browsers (“This browser or app may not be secure”); a profile doesn’t change that. Blitz’s own OAuth (MCP servers, pkg/mcpauth) stays as RFC 8252 says: the system browser and a loopback redirect.

2. Profiles

  • BP-01 config.BrowserProfiles: browser-profiles.json in the settings directory lists the profiles (name: lowercase letters, digits, - and _, up to 32; when made; the sites it browses without asking) and each workspace’s choice, by its folder with symbolic links resolved. Each profile’s data is browser/profiles/<name> beside it, 0700. A profile is the person’s: no project setting names one (WEB-38).
  • BP-02 ConfigService: ListBrowserProfiles (with a workspace’s choice), CreateBrowserProfile, DeleteBrowserProfile (its data and the workspaces’ choice too), ClearBrowserProfile (signed out of everything, the profile kept), SetBrowserProfileDomains, SetWorkspaceBrowserProfile ("": none), and OpenBrowserProfile, which starts the system’s Chrome (or Chromium, Edge, Brave) on the profile’s folder at a web page, on the service’s machine, to sign in by hand (NO_BROWSER without one). A name that’s gone is NOT_FOUND, NO_BROWSER_PROFILE.

3. Browsing with one

  • BP-03 The browser tool takes the workspace’s profile before each action (syncProfile): Chrome is launched with its folder (Options.ProfileDir; the last run’s DevToolsActivePort is removed first, and Close keeps the folder), so the sign-ins last; a change of profile closes the browser, and the next action starts one with the new one. None when the workspace has none, or its project settings are new, changed or declined (a project the person hasn’t trusted could steer the agent into their sign-ins): a throwaway profile, as before.
  • BP-03a 2026-11-05 (scan N26-engine-top-2#20: the profile followed trust as the workspace opened, and the language servers trust as it is now, so forgetting trust kept the profile and --trust-project withheld both). The browser profile and the language servers ask one question (Workspace.projectTrusted): no project files, or trusted now, or this run trusts them (--trust-project, its files loaded). Trust forgotten while the workspace is open withholds both from the next action.
  • BP-03b Built 2026-11-18 (the owner: “I can create a profile … log into sites with that profile. What I can’t do is drive that profile from the agent, which is the entire reason for having the profiles”). The agent may browse with any of the person’s profiles: the browser tool’s profile names one (none: signed out), kept for the chat (browserTool.chosen). The workspace’s own goes without asking; any other, or the workspace’s own while it’s withheld (BP-03a), is asked first (browser:profile:<name>, a network approval naming its sites), and refused is an error. A name that isn’t one is an error listing the person’s profiles (Registry.SetBrowserProfiles: the workspace’s, all, and the withheld one).
  • BP-03c Built 2026-11-18. The agent is told, once a chat, in a navigate’s note: browsing signed out while the person has profiles, which ones with their sites, and how to use one; the workspace’s own withheld until its project settings are trusted; and browsing in Chrome’s copy of a profile (BP-05: no app window), whose sign-ins made with Sign in… aren’t in it. The tool’s description says it browses signed in with a profile, for anything behind a sign-in.
  • BP-03d Built 2026-11-18 (the owner’s session: “open the license.retailcortex.com page” opened signed out, with a password to type, though the only profile’s sites were *.retailcortex.com). With no profile named, none chosen in the chat and none the workspace’s own, the one profile whose sites include the page’s (browserTool.forSite) is offered, as a named one is (BP-03b): by the browser’s navigate, open_page and web_fetch (signedInAs, then the browser asks). Refused, the chat browses signed out and isn’t asked again; two profiles with the site, none is offered.
  • BP-03e Built 2026-11-18 (the owner: “If a single profile is available, it should be the default profile”; “I like the idea of anonymous”). A workspace that chose none browses with the person’s only profile, as if chosen (Workspace.browserProfiles). Anonymous (config.AnonymousBrowserProfile, reserved: no profile is named anonymous or none) is a workspace’s choice to browse signed out, kept in browser-profiles.json; no profile is offered for a site there (BP-03d). The agent names it as profile: anonymous (none too). The workspace’s picker: Default: , your only profile (or None chosen with several), Anonymous (signed out), then the profiles.
  • BP-04 With a profile, the browser’s approvals use the profile’s own sites in place of web.allow_domains (its sign-ins go with every request): those go without asking, every other site asks, deny rules still refuse.
  • BP-04a Built 2026-11-19 (a report: with profile work, whose sites were *.example.com, browser navigate to jira.example.com, an intranet behind a VPN, failed with net::ERR_BLOCKED_BY_CLIENT while www.example.com loaded; no approval was asked, as the site was the profile’s). A name among the profile’s own sites may resolve to a private address (RFC 1918, carrier-grade NAT 100.64.0.0/10, unique local IPv6; browser.PrivateAddr) without browser.allow_local: the user listed it and signs in to it, so it’s theirs to reach. Loopback still needs allow_local, link-local never; a literal address is never a profile site. Headless, the proxy judges each address by the host it dials for (Options.PrivateHost, WEB-32); in the app the open command carries the sites (AgentBrowserCommand.private_sites, EL-17b).
  • BP-04b 2026-11-21 (security review electron#1: a site of * or 10.* let every page reach the private network). Only sites that name a domain give private-network reach: not a literal address, not a pattern without a domain (*, 10.*, intranet); a literal address is never one, in the headless browser and the app’s.
  • BP-05 In the desktop app, the agent’s in-app browsing (spec_050_agent_browser) uses the profile’s Electron partition, persist:profile-<name>; Sign in… opens a window on it (SignInWindow, EL-16), whose popups (OAuth’s) open in the same session. The two stores are apart: Chrome’s folder for the browsing done without the app (jobs, the CLI), the partition for the app’s; the user signs in to each they’ll use, and Settings says so.

4. The window

  • BP-06 Settings › Browser: each profile with Sign in… (in the app), Sign in with Chrome…, the site to open, its sites (one a line, saved as the field is left), Sign out of everything and Delete (asked); a field to make one. A workspace’s settings › Browser › Browser profile chooses one, or none (signed out), in simple mode too (2026-11-18: it was under Advanced, so a profile made in Settings was never used).
  • BP-07 Built 2026-11-18. web_fetch of a page whose site is one of the profile in use’s sites loads it in the browser, signed in (webFetcher.signedIn; Via: browser, a note naming the profile), under the browser’s approvals (BP-04), not as a plain request, which carries no sign-ins and would get the site’s login page. The browser failing falls back to the plain request.
  • BP-08 Built 2026-11-18 (the owner’s session: “open the internal browser using the work profile” went to open_page, which couldn’t). open_page shows a page signed in with a profile: its profile names one (asked first unless it’s the workspace’s own, BP-03b; none: signed out), else the one the chat browses with. The page command carries it (AgentBrowserCommand.profile), and the app’s web tab opens in the profile’s partition (PreviewOpen’s profile, persist:profile-<name>) rather than the previews’ own. The system’s browser has its own sign-ins: the result’s note says so.
  • BP-08a 2026-11-21 (security review electron#2; the owner chose “Allow for this chat”). A page outside the profile’s own sites asks before it opens signed in with it (its sign-ins go with the page’s requests, as the browser asks for such a site, BP-04): Allow for this chat answers for that site in that chat. The profile’s own sites, and a page signed out, open without asking. The page command carries the browser’s reach (allow_local, deny_domains, the profile’s own site names as private_sites), and the app’s web tab registers it with the session’s network filter, as the agent’s views do (EL-17): no private address without browser.allow_local (but for a local page the person said to open, AB-10b), never a denied domain.