You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(browser): clear cookies for one profile on any Settings host, including SSH hosts - #47955
Settings › Browser now has a Cookies row with Clear cookies…. It signs you out of every site in the active profile of the host you picked, and nowhere else. SSH hosts now show up in the Host list too, so their sign-ins can be imported and cleared there. The trash icon on Default is gone, so a trash icon always means "remove profile".
Files
Added
Deleted
Net
Test
2
$\color{#1a7f37}{\Huge{\mathbf{+}}}$91
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$91
Prod
62
$\color{#1a7f37}{\Huge{\mathbf{+}}}$927
$\color{#cf222e}{\Huge{\mathbf{−}}}$344
$\color{#1a7f37}{\Huge{\mathbf{+}}}$583
What Changed
Before: only the Default profile could be cleared, with the trash icon on its row. Other profiles could only be removed. SSH hosts weren't in the Host list, and the cookies this computer keeps for their pages went away only when the host was removed.
After: a Cookies row sits above Google cookies and acts on the active profile of the selected host:
This computer: clears that profile's own store.
Paired server: clears both of that profile's stores, the one this computer uses for This-device pages and the server's own, which streamed pages, phones and server agents use.
SSH host: clears the store this computer keeps for that host's pages. It works while the host is disconnected.
Other profiles and hosts keep their cookies. Each clear restores saved session cookies first, so they can't come back later, and it removes the "Imported from …" label.
SSH hosts in the Host list ("staging (SSH)", detail "Pages for this SSH host open on this computer."). Their rows show this computer's profiles. Import cookies fills that host's store and shows its own label. Picking a profile there sets the same default that SSH pages already use. Google cookies reads "Unavailable for this profile on the selected host." for SSH hosts. Browser Use setup ignores an SSH selection and keeps its previous behaviour.
Copy is taken from the approved mockup: the row text per host kind, the confirm dialog ("Clear cookies in Work on build-box?") and the done toast ("Cleared cookies in Work on build-box."). A failure toast was added: "Couldn't clear cookies in Work on build-box. Try again."
Mechanism:
Server: a new RPC, browser.profileClearCookies {profileId, executorRuntimeId}, behind the capability browser.profile-cookie-clear.v1. The capability is only advertised when the browser engine serves it (an orcad's sidecar app may be older). It uses the registry's clearProfileSessionCookies, which replaces the Default-only clear.
Desktop: IPC calls browser:session:clearCookies, …ForClientHost and …ForSshHost (browser-cookie-clear-ipc.ts). In each, main finds the store from the host and profile id. A renderer never names a partition, and a lookup never creates a store.
SSH: binding code moved to local-ssh-browser-partition-bindings.ts. Settings imports bind the host's store when no page has prepared it yet (registered targets only). Deleting a profile now also wipes SSH stores that no page prepared this launch. This also fixes a pre-existing leak, where stores from earlier launches were left behind.
SSH import labels use the existing route label store (ssh:<targetId> keys).
Why
Kelvin approved this design in the round 2 mockups (section 4). It reuses the local clear, the route-jar restore-then-clear from #47105, and the existing label store. A paired server's profile has two stores, so clearing it clears both, as Default already did after #47105.
Linked Issue
No GitHub issue. This is gap NEW-10 from the remote browser parity audit (2026-11-22), built from the approved mockup.
Visual Proof
Before (main): with a server selected, only Default has a clear (trash), and there are no SSH hosts.
After: a Cookies row for the active profile on the selected host, and Default has no trash.
The Host list includes SSH hosts:
The confirm dialog for a paired server:
An SSH host after Clear: the label is gone.
The after shots come from a hidden e2e build (isolated HOME, mock keychain) paired to a worktree-built headless orca serve. The before shot is the approved mockup's "Today" render of the same components on main.
Testing
Real paired runtime on macOS, with a hidden desktop build paired to a headless orca serve from this branch. Both had isolated HOMEs and the mock keychain. I drove the real Settings UI with Playwright, stubbing the file picker with scratch cookie files.
Setup: the server got a Work profile, with cookies seeded in its Work and Default stores. A This-device page on the server started this desktop's client host. Two SSH hosts, staging and prod, were added and never connected. This computer also got a Work profile.
Imports: Settings imports went into Work on this computer, on the server (This-device store), on prod (SSH) and on staging (SSH). Each import held one persistent and one session cookie, and each row showed the "File" label.
Clear Work on staging: only staging's two cookies went. prod, the server and the local stores kept theirs, and staging's label went.
Clear Work on the server: the This-device store's cookies (persistent and session) went, and so did the server's Work store. The server's Default store (srv_other) and every other store kept theirs.
Clear Work on this computer: only that store went. prod's SSH store still held its cookies at the end.
Agent refusal: the server's own CLI client (a local-cli caller) calling browser.profileClearCookies got "Agents can't clear a browser profile's cookies. Clear them from Settings › Browser in Orca.", and nothing was cleared.
Unit tests for the two new security boundaries:
browser-profile-rpc-methods.test.ts: agents are refused on both clear RPCs.
local-ssh-browser-partition-bindings.test.ts: a lookup names only the selected host's and profile's store and never binds one.
Both fail with their guard removed (checked).
pnpm check:changed passes.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because a clear runs only on a confirmed click. Each click does one bounded (≤256 KB) read of the existing binding file, the same as opening a route page, then async Chromium clears and one profile refetch, so the list renders once rather than once per cookie. Deleting a profile reads the binding file once for all SSH hosts. The Settings hook adds no listeners or timers. The import menu notice computes the SSH label only for SSH hosts, and only while the menu is open. An SSH listing adds one IPC, and its label file is cached after the first read. The perf-scan pass found nothing.
Risk
Who can trigger it: only the person, by clicking in Settings › Browser and confirming.
Agents are refused on browser.profileClearCookies and, new here, on browser.profileClearDefaultCookies too. That covers local-cli callers and paired callers that claim the agent capability.
An orcad's browser engine sidecar accepts calls only from its own orcad, which applied the check first.
Phones can't call either method (they aren't in the mobile allowlist). Web pages and other OS users have no path.
Older peers:
A new desktop with an older server clears Default through the old RPC. For other profiles on that server it shows "Unavailable for this profile on the selected host."
An older desktop with a new server is unchanged.
Phones are untouched.
The desktop IPC channel browser:session:clearDefaultCookies / …ForClientHost was replaced by profile-aware channels. Main and preload ship in the same build.
Riskiest part: binding an SSH host's store from Settings before any page opens it. Only registered SSH targets can be bound, and profile deletion now finds and wipes those stores. A plain revert backs this out. A revert leaves any SSH stores already filled from Settings in place until their host is removed.
Level: Medium
AI Disclosure
Review
The Codex release gate ran four rounds; the last printed NO P0 OR P1 on the final head.
Round 1, P1: SSH stores filled only from Settings weren't wiped when their profile was deleted. Fixed.
Round 2, P1: profile deletion reread the binding file once per SSH host. Fixed: it now reads once.
Rounds 3 and 4: NO P0 OR P1.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Security: every IPC checks isTrustedBrowserRenderer and bounds its ids, and main derives each store from them. The RPC checks the caller's identity and the executor runtime id.
Cross-platform: Electron session APIs and existing binding code only.
Not covered: stores of pages on an SSH host or WSL distro behind a paired server. Those pages keep their own per-page stores, which this doesn't enumerate.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
…ost, including SSH hosts
Settings › Browser gets a Cookies row with Clear cookies… for the active
profile of the selected host. On a paired server it clears both of that
profile's stores (this computer's This-device jar and the server's),
on an SSH host the jar this computer keeps for that host's pages, and
locally the profile's own jar. SSH hosts join the Host list, and their
Settings imports fill the host's jar. Default's trash icon goes away.
The server side adds browser.profileClearCookies behind
browser.profile-cookie-clear.v1; agents' CLI callers are refused on it
and on browser.profileClearDefaultCookies.
No actionable comments were generated in the recent review.
Walkthrough
Cookie clearing now targets a selected browser profile on a local, paired-server, or SSH host. The change adds SSH partition binding and route-based import-source tracking. New runtime, RPC, preload, IPC, and renderer paths carry profile-specific clear requests. The settings UI adds host-specific controls and confirmation messages. Runtime capability reporting and RPC caller checks also change.
Merge Risk: Moderate · up to 8d066 · assessed changes only
Path filters excluded changed files. This rating applies only to the assessed changes.
This change adds per-profile cookie clearing across local, paired-server and SSH hosts. Open items remain: route binding migration on conflict, a stale-pairing race in the paired-server clear, how the sidecar exemption is scoped, invalid SSH host ids falling back to a local clear, unclear Browser Use behavior on SSH selection, and docs that overstate streamed-page coverage. Confirm or accept these before merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a per-profile cookie clear available on any Settings host, including SSH hosts. The changeset adds a profile-scoped clear RPC, IPC channels, SSH host listing, and SSH …
Description check
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Note…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a per-profile cookie clear available on any Settings host, including SSH hosts. The changeset adds a profile-scoped clear RPC, IPC channels, SSH host listing, and SSH store binding, all matching the title. The title follows the conventional commit style used in the repository.
Full details: Description check
Explanation
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. The Linked Issue section says there is no GitHub issue, and the template requires one for outside contributors. The Risk level is given as Medium. The AI Disclosure section is empty. The Testing and Performance sections are detailed. The Linked Issue gap and the empty AI Disclosure section are the main completeness concerns. The author is likely a maintainer, which the template treats as a special case, so the missing issue may be acceptable.
Resolution
Confirm whether the Linked Issue requirement applies, since the author is not identified as a maintainer. Fill in or mark the AI Disclosure section (it is empty). The PR objectives also note that the commit message says Browser Use follows the selected host, while the description says Browser Use ignores SSH selection. Reconcile these two statements.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Import cookies from Chrome or Edge (or from a cookie file) into a profile from Settings or the browser toolbar. Orca replaces existing cookies only for domains included in the import, so sign-ins for unrelated sites in the same profile stay intact. Google cookies are excluded — import menus show **Google logins aren't imported** and tell you to **Sign in to Google directly in Orca.** After an import that skipped Google cookies, a separate warning names the host that ran the import: open a browser in Orca on that host with the same profile, then sign in.
**Clear default cookies** on the Default profile removes every cookie in it after you confirm, signing you out of sites in that profile.
**Clear cookies…** in Settings › Browser removes every cookie in the active profile of the selected host after you confirm, signing you out of every site in that profile. For a paired Orca server it clears both of that profile's stores: the one this computer uses for its pages and the server's own, which streamed pages use. For an SSH host it clears the store this computer keeps for that host's pages. Other profiles and hosts keep their cookies.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Document the streamed-page store limitation.
Streamed SSH or WSL pages behind a paired server can use per-page stores that this clear operation does not enumerate. The statement that streamed pages use the server’s own store can lead users to believe those cookies were cleared. Describe that limitation here.
The PR testing notes identify those stores as not covered.
Minor · Functional Correctness · Quick win
Don't state that clearing cookies signs the user out of every site.
The profile clear removes only cookies. Sites that keep their sign-in state in local storage or other site data stay signed in after the clear. Limit the sign-out claim to sites that use cookies, and state the exception.
Suggested fix
--- "a/docs/site/content/docs/browser/profiles.mdx"+++ "b/docs/site/content/docs/browser/profiles.mdx"@@ -22,7 +22,7 @@
Import cookies from Chrome or Edge (or from a cookie file) into a profile from Settings or the browser toolbar. Orca replaces existing cookies only for domains included in the import, so sign-ins for unrelated sites in the same profile stay intact. Google cookies are excluded — import menus show **Google logins aren't imported** and tell you to **Sign in to Google directly in Orca.** After an import that skipped Google cookies, a separate warning names the host that ran the import: open a browser in Orca on that host with the same profile, then sign in.
-**Clear cookies…** in Settings › Browser removes every cookie in the active profile of the selected host after you confirm, signing you out of every site in that profile. For a paired Orca server it clears both of that profile's stores: the one this computer uses for its pages and the server's own, which streamed pages use. For an SSH host it clears the store this computer keeps for that host's pages. Other profiles and hosts keep their cookies.+**Clear cookies…** in Settings › Browser removes every cookie in the active profile of the selected host after you confirm. This signs you out of sites that keep their sign-in state in cookies. Sites that also store sign-in state in local storage or other site data can stay signed in. For a paired Orca server it clears both of that profile's stores: the one this computer uses for its pages and the server's own, which streamed pages use. For an SSH host it clears the store this computer keeps for that host's pages. Other profiles and hosts keep their cookies.
When a site requests a discoverable passkey from a USB security key and the key offers multiple accounts, Orca opens an account picker instead of silently canceling the sign-in. Choose the account you want or cancel the request. Platform passkeys stored by the operating system are not available in Orca yet; this flow is for external FIDO security keys.
Committable suggestion
IMPORTANT
Review the replacement and indentation, then test before committing.
Suggested change
**Clear cookies…** in Settings › Browser removes every cookie in the active profile of the selected host after you confirm, signing you out of every site in that profile. For a paired Orca server it clears both of that profile's stores: the one this computer uses for its pages and the server's own, which streamed pages use. For an SSH host it clears the store this computer keeps for that host's pages. Other profiles and hosts keep their cookies.
**Clear cookies…** in Settings › Browser removes every cookie in the active profile of the selected host after you confirm. This signs you out of sites that keep their sign-in state in cookies. Sites that also store sign-in state in local storage or other site data can stay signed in. For a paired Orca server it clears both of that profile's stores: the one this computer uses for its pages and the server's own, which streamed pages use. For an SSH host it clears the store this computer keeps for that host's pages. Other profiles and hosts keep their cookies.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Reject invalid host IDs before selecting a clear operation.
ExecutionHostId permits strings such as ssh:%, but parseExecutionHostId rejects them. The current fallback then calls sessionClearCookies({ profileId }), which selects the local store instead of rejecting the SSH target.
If parsing fails, return false before dispatch. Keep the local clear operation restricted to a parsed local host.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Data Integrity & Integration · Quick win
Desktop cookie clear runs before the server confirms the pairing revision.
The renderer starts the desktop clear and the server clear in the same Promise.all. The desktop request sends no pairing revision. If the paired server is re-paired after the user confirms, the desktop clear can clear the replacement pairing's This-device cookies. The server branch then rejects the stale pairingRevision and returns false, but the desktop cookies are already gone.
The result is a partial clear reported as a failure. Settings shows an error while the desktop jar for the replacement pairing has been cleared.
The desktop clear must not run for a pairing that the server rejects. Either sequence the desktop clear after the server revision check, or send the expected revision to the desktop handler and compare it there before clearing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Settings › Browser now has a Cookies row with Clear cookies…. It signs you out of every site in the active profile of the host you picked, and nowhere else. SSH hosts now show up in the Host list too, so their sign-ins can be imported and cleared there. The trash icon on Default is gone, so a trash icon always means "remove profile".
What Changed
browser.profileClearCookies {profileId, executorRuntimeId}, behind the capabilitybrowser.profile-cookie-clear.v1. The capability is only advertised when the browser engine serves it (an orcad's sidecar app may be older). It uses the registry'sclearProfileSessionCookies, which replaces the Default-only clear.browser:session:clearCookies,…ForClientHostand…ForSshHost(browser-cookie-clear-ipc.ts). In each, main finds the store from the host and profile id. A renderer never names a partition, and a lookup never creates a store.local-ssh-browser-partition-bindings.ts. Settings imports bind the host's store when no page has prepared it yet (registered targets only). Deleting a profile now also wipes SSH stores that no page prepared this launch. This also fixes a pre-existing leak, where stores from earlier launches were left behind.ssh:<targetId>keys).Why
Kelvin approved this design in the round 2 mockups (section 4). It reuses the local clear, the route-jar restore-then-clear from #47105, and the existing label store. A paired server's profile has two stores, so clearing it clears both, as Default already did after #47105.
Linked Issue
No GitHub issue. This is gap NEW-10 from the remote browser parity audit (2026-11-22), built from the approved mockup.
Visual Proof
Before (main): with a server selected, only Default has a clear (trash), and there are no SSH hosts.
After: a Cookies row for the active profile on the selected host, and Default has no trash.
The Host list includes SSH hosts:
The confirm dialog for a paired server:
An SSH host after Clear: the label is gone.
The after shots come from a hidden e2e build (isolated HOME, mock keychain) paired to a worktree-built headless
orca serve. The before shot is the approved mockup's "Today" render of the same components on main.Testing
Real paired runtime on macOS, with a hidden desktop build paired to a headless
orca servefrom this branch. Both had isolated HOMEs and the mock keychain. I drove the real Settings UI with Playwright, stubbing the file picker with scratch cookie files.Setup: the server got a Work profile, with cookies seeded in its Work and Default stores. A This-device page on the server started this desktop's client host. Two SSH hosts, staging and prod, were added and never connected. This computer also got a Work profile.
Imports: Settings imports went into Work on this computer, on the server (This-device store), on prod (SSH) and on staging (SSH). Each import held one persistent and one session cookie, and each row showed the "File" label.
Clear Work on staging: only staging's two cookies went. prod, the server and the local stores kept theirs, and staging's label went.
Clear Work on the server: the This-device store's cookies (persistent and session) went, and so did the server's Work store. The server's Default store (
srv_other) and every other store kept theirs.Clear Work on this computer: only that store went. prod's SSH store still held its cookies at the end.
Agent refusal: the server's own CLI client (a local-cli caller) calling
browser.profileClearCookiesgot "Agents can't clear a browser profile's cookies. Clear them from Settings › Browser in Orca.", and nothing was cleared.Unit tests for the two new security boundaries:
browser-profile-rpc-methods.test.ts: agents are refused on both clear RPCs.local-ssh-browser-partition-bindings.test.ts: a lookup names only the selected host's and profile's store and never binds one.Both fail with their guard removed (checked).
pnpm check:changedpasses.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because a clear runs only on a confirmed click. Each click does one bounded (≤256 KB) read of the existing binding file, the same as opening a route page, then async Chromium clears and one profile refetch, so the list renders once rather than once per cookie. Deleting a profile reads the binding file once for all SSH hosts. The Settings hook adds no listeners or timers. The import menu notice computes the SSH label only for SSH hosts, and only while the menu is open. An SSH listing adds one IPC, and its label file is cached after the first read. The perf-scan pass found nothing.
Risk
Who can trigger it: only the person, by clicking in Settings › Browser and confirming.
browser.profileClearCookiesand, new here, onbrowser.profileClearDefaultCookiestoo. That covers local-cli callers and paired callers that claim the agent capability.Older peers:
browser:session:clearDefaultCookies/…ForClientHostwas replaced by profile-aware channels. Main and preload ship in the same build.Riskiest part: binding an SSH host's store from Settings before any page opens it. Only registered SSH targets can be bound, and profile deletion now finds and wipes those stores. A plain revert backs this out. A revert leaves any SSH stores already filled from Settings in place until their host is removed.
Level: Medium
AI Disclosure
Review
The Codex release gate ran four rounds; the last printed
NO P0 OR P1on the final head.NO P0 OR P1.Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
isTrustedBrowserRendererand bounds its ids, and main derives each store from them. The RPC checks the caller's identity and the executor runtime id.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)