[codex] Enable local cookie sync for Browser Use cloud - #23
Merged
Conversation
Cheggin
marked this pull request as ready for review
May 31, 2026 05:00
Contributor
There was a problem hiding this comment.
2 issues found across 8 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Users need a direct way to copy local Chromium cookie state into a Browser Use cloud profile, and agents need the same operation available through the browser runtime command surface when explicitly requested. This adds a profile sync runtime command, a user-facing sync-cookies CLI command, and a /sync-cookies TUI flow that gates on a Browser Use API key, lists local profiles, and imports all cookies by default into a distinct cloud profile name. Constraint: Browser Use cloud accepts browser state through a live remote browser CDP session, so the sync flow starts temporary local and cloud browser sessions rather than relying on a bulk upload endpoint. Rejected: Expose a broad browser CLI command | it would widen the user-facing tool surface beyond the cookie-sync use case. Confidence: high Scope-risk: moderate Directive: Keep this flow scoped to cookie syncing unless another explicit browser profile operation earns its own user-facing command. Tested: scripts/verify-terminal-ui.sh Tested: cargo test -p browser-use-browser profile_sync -- --nocapture Tested: cargo test -p browser-use-tui sync_cookies -- --nocapture Tested: cargo test -p browser-use-cli sync_cookies -- --nocapture Tested: cargo test -p browser-use-core browser_tool_description -- --nocapture Not-tested: Live Browser Use cloud cookie import with a real API key Co-authored-by: OmX <omx@oh-my-codex.dev>
Contributor
Author
|
@cubic review |
Contributor
Contributor
There was a problem hiding this comment.
1 issue found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/browser-use-core/src/product_analytics.rs">
<violation number="1" location="crates/browser-use-core/src/product_analytics.rs:137">
P1: Avoid sending raw user message text to product analytics; this introduces a privacy/security data-exposure risk.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| "is_child_task": is_child_task, | ||
| "message_kind": message_kind, | ||
| "message_seq": message_seq, | ||
| "text": text, |
Contributor
There was a problem hiding this comment.
P1: Avoid sending raw user message text to product analytics; this introduces a privacy/security data-exposure risk.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/browser-use-core/src/product_analytics.rs, line 137:
<comment>Avoid sending raw user message text to product analytics; this introduces a privacy/security data-exposure risk.</comment>
<file context>
@@ -34,6 +43,106 @@ pub fn capture_blocking(store: &Store, event: &str, properties: Value) {
+ "is_child_task": is_child_task,
+ "message_kind": message_kind,
+ "message_seq": message_seq,
+ "text": text,
+ "text_chars": text.chars().count() as i64,
+ });
</file context>
dhanushk-offl
pushed a commit
to dhanushk-offl/terminal
that referenced
this pull request
Jun 3, 2026
[codex] Enable local cookie sync for Browser Use cloud
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
sync-cookiesCLI command and/sync-cookiesTUI flow with API-key gating and local profile selection.Validation
scripts/verify-terminal-ui.shcargo test -p browser-use-tui sync_cookies -- --nocapturecargo test -p browser-use-tui mouse_capture -- --nocapturecargo test -p browser-use-tui logo_click -- --nocaptureNot Tested
Summary by cubic
Sync local Chromium cookies to Browser Use cloud profiles via a new
browser profile syncruntime command, async-cookiesCLI, and a/sync-cookiesTUI flow. The TUI gates on auth, lists local profiles, runs a temporary cloud browser session (CDPStorage.setCookies), and shows a clear “Complete” message with bold cookie counts. Lightweight text-only analytics log initial, follow-up, request-input, and blocked (no-auth) user messages across core/CLI/TUI.New Features
browser profile syncimports local cookies into Browser Use cloud using a temporary remote session, with API-key gating, include/exclude domain filters, profile selection when omitted, and JSON responses (ok/needs-auth/needs-user-action).sync-cookies [LOCAL_PROFILE] [--all-cookies|--domain ...] [--exclude-domain ...] [--cloud-profile-id|--cloud-profile-name|--new-cloud-profile-name]; readsBROWSER_USE_API_KEYfrom settings or env when present; pretty-prints JSON./sync-cookiessurface that checks for a cloud key, lists local profiles, syncs with status updates, and shows a bold cookie count on completion; accessible from the command palette.browser-use-core::run_standalone_browser_commandand..._with_browser_use_api_keyto invoke runtime commands; analytics capture initial/follow-up/request-input and blocked messages.Migration
/author setBROWSER_USE_API_KEY.browser-use-terminal sync-cookies 'google-chrome:Default' --all-cookies.--cloud-profile-id/--cloud-profile-name, or filter with--domain/--exclude-domain.Written for commit b35645e. Summary will update on new commits.