Repository navigation
Open a thread's links in the browser profile assigned to its provider instance #31160
loyalunion
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
I run two Claude provider instances, set up the way the Claude provider guide describes: "Claude Work" with its own CLAUDE_CONFIG_DIR, and "Claude Personal" on the default directory. Each is signed in to a different Claude account.
When an agent publishes something that only its own account can open (a claude.ai artifact, for example), it gives me a link. Clicking that link in chat opens it in the browser panel's default profile. That profile can only be signed in to one of the two accounts, so links from the other instance always fail ("Page not found" on claude.ai).
Browser profiles already solve half of this: I have a "Claude Work" profile signed in to the work account and the Default profile signed in to my personal one. If I paste the link into a Claude Work tab, it works. What's missing is a way for a clicked link to pick that profile on its own. Changing the default profile only moves the problem to the other instance.
Proposal
Let a browser profile be assigned to provider instances, and open a thread's links in the profile assigned to that thread's instance.
Settings → Browser → Browser profiles: each profile's ⋮ menu gets an Open links from submenu listing the enabled provider instances, as checkboxes. Assigned instances show as a small badge on the profile row.
Clicked links: a link opened from a thread uses its instance's assigned profile. Instances with no assignment use the default profile, so nothing changes for anyone who doesn't set this.
New browser tabs opened with + in that thread start in the same profile. The existing "open browser in a profile" submenu still overrides it.
Removing a profile removes its assignments.
It's a client setting (browserProviderProfileIds, provider instance → profile id), stored next to browserProfiles and browserDefaultProfileId, because profiles are per device. There's no server or protocol change. Resolution happens in openUrlInPreview and openPreviewSession, which already accept a profileId and currently fall back to the default.
Scope
Desktop and web share the change. Mobile doesn't have browser profiles, so it's unaffected.
Tabs that agents open with preview_open still use the default profile unless the agent passes profileId. Applying the same mapping there would need the server to know the client's assignments. I left that out to keep this small, but I'm happy to follow up if you want it.
Status
I have this working locally on v0.1.7 (about 120 lines across 7 files, including a test case for assigned, unassigned, removed-profile and no-provider threads). check:changed passes apart from a browser test my machine couldn't run. I'm using the build daily with two Claude accounts.
Screenshots:
It is possible I am missing a setting that could have fixed this but wanted to share it.
All reactions