Repository navigation
feat(preview): let agents open tabs in a specific browser profile - #9704
amitrockach-legion wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a new agent-facing workflow for creating preview tabs in selected browser profiles, requiring coordinated contract, server-routing, and desktop changes. Because it changes profile-specific tab-creation defaults and controls authenticated cookie isolation, the runtime and compatibility impact merits human review. You can add or adjust custom eligibility rules. Learn more. |
…ic browser profile preview_open accepts an optional profileId that opens a new tab in an existing browser profile; preview_status reports the tab's profileId. Hosts advertise supportsOpenProfile so the broker never routes a profile-scoped open to an older desktop. Fork adaptation: an open without profileId still resolves the user's configured default profile via browserDefaultOpenProfileId, and the new error class follows the fork's Schema.TaggedError convention. (cherry picked from commit d33b6ee) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Note This comment is posted by Julius' dot Closing for missing verification results. The diff adds contract, broker and profile-selection tests, but neither the description nor comments report running them, and the current checks contain no test run. Please report focused commands and outcomes for selecting a profile, rejecting unknown profiles and avoiding unsupported hosts, then request reconsideration. |
What changed
When agents check different app versions in parallel, they need separate browser logins. The preview UI already supports browser profiles, but
preview_opencannot select one. This exposes an optionalprofileIdso an agent can open a new tab in an existing profile without reusing another task's login.Changes:
profileIdonpreview_open, always creating a new tab and rejecting conflicting tab-reuse options or unknown profiles.Why
Changing a global default is awkward for concurrent tasks. Per-call selection uses the existing profile and tab-creation machinery, while calls without
profileIdretain their current behavior. This does not add profile creation or management, and opening a new tab does not clear that profile's cookies.Related: #9402 makes agent-opened tabs honor the configured default profile. This PR adds explicit per-call selection; it does not depend on that PR.
Checklist
Implemented with GPT-6 through the Codex harness in T3 Code.
Note
Medium Risk
Changes how preview tabs are created and which desktop host handles opens, directly affecting cookie/login isolation; mitigations include explicit capability negotiation and rejecting unknown profiles instead of falling back.
Overview
Agents can pass optional
profileIdonpreview_opento spin up a new tab in an existing desktop browser profile (default,incognito, or custom IDs), so parallel tasks can keep separate logins without changing global defaults.Contracts and MCP behavior:
PreviewAutomationOpenInputgainsprofileIdwith schema rules that forbid combining it withtabIdorreuseExistingTab: true; default tab reuse is off when a profile is set.preview_statuscan returnprofileId. Desktop hosts advertisesupportsOpenProfile; the automation broker only routes profile opens to capable hosts and returns no host rather than sending profile selection to legacy desktops.Desktop: Opens honor the requested profile via
previewAutomationOpenOptions(unknown profiles fail withPreviewAutomationProfileNotFoundError). Current Electron hosts registersupportsOpenProfile: true. User docs describe the agent workflow for separate task logins.Reviewed by Cursor Bugbot for commit d33b6ee. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
profileIdsupport toPreviewAutomationOpenInputfor opening tabs in specific browser profilesprofileIdfield to thePreviewAutomationOpenInputcontract, validated against known browser profile IDs, and rejects combining it withtabIdorreuseExistingTab=truePreviewAutomationHostregistration with a boolean capability flag; the broker routes profile open requests only to hosts that advertise profile supportPreviewAutomationProfileNotFoundErrorfor unknown profilesnormalizePreviewOpenInputnow defaultsreuseExistingTabtofalsewhenprofileIdis present, creating a new tab instead of reusingPreviewAutomationStatusincludes the tab'sprofileId, defaulting to the default profile when the snapshot lacks oneMacroscope summarized d33b6ee.