Repository navigation
[Feature]: Let an MCP client label its own extension tab group #43823
Description
Follow-up to #41840 (closed in #43813), re-filed against v1.64.1 with a concrete use case as requested.
What I'm trying to do
I run several AI agent sessions in parallel (Claude Code in a few terminals plus Claude desktop), all driving my everyday Chromium-based browser through the Playwright MCP Bridge extension (--extension). Each session works on a different task, e.g. one checks an order flow, one reads docs, one fills a form.
Since multi-connection support (#42259), each connection gets its own tab group titled Playwright · <clientName> with its own color. That keeps tabs apart, but it doesn't tell me which group belongs to which task:
- All sessions come from the same client, so every group gets the same title (
Playwright · claude-code,Playwright · claude-code, ...). - Colors are assigned in connection order, so they don't map to anything I can remember.
- When a session asks me to finish something by hand (a login, a payment step, a captcha), I have to open each group to find the right tab.
Why existing options don't cover it
clientName comes from the MCP client and is the same for every session of that client. There's no way for the server or the agent to set a more specific group title. Only the agent knows what it's working on, so the label has to be settable at runtime.
Proposal
An MCP tool, available only in --extension mode, that lets a connection label its own tab group:
browser_set_group_label({ label: "checkout flow bug" })
→ the group becomes Playwright · checkout flow bug.
This was already implemented in #42360 (green CI, closed as part of the archiving). The behavior there, plus answers to the open questions from #41840:
- Ownership: a connection can only rename its own group. There's no group/connection id parameter.
- Duplicates: if another active connection uses the same label, a
(2),(3)suffix is added. - Constraints: label is trimmed and capped at a reasonable length. Chrome may still truncate the title in the tab strip, and that's fine.
- Reset: an empty label restores the default
Playwright · <clientName>. - Disconnect: nothing to clean up. The label lives with the connection's group and goes away with it.
- Compatibility: a new session-level
extension.setGroupLabelrelay command, no protocol bump. An older extension returns a clear "update the extension" error. - Tests: two connections with the same
clientName, each sets a label. Check the titles and that neither can affect the other.
Smaller alternative
If a new tool is too much, a startup option would cover most of my case: --tab-group-label <label> (or an env var) on the MCP server, used instead of clientName in the group title. I'd set it per session when I launch the agent. It's less flexible than the tool, since the label can't follow the task, but it needs no protocol change.
cc Gabriel dos Anjos (@dosxnjos) (author of #41840)
Activity
github-actions commentedon Oct 31, 2026
github-actions commentedon Oct 31, 2026
Hi, I'm the Playwright bot and I checked this on Linux.
Confirmed: task labels are missing on
1.65.0-next(deb7e86201e26cb4a8e25191fce5ef2f7a28aa87). Identical client names already get numeric suffixes, but there is no way to set a task label. I've prepared a change addingbrowser_set_group_label({ label: "checkout flow" })in extension mode, with connection-local ownership, duplicate suffixes, input limits, and empty-label reset.Verification
The extended two-client test fails on the unchanged checkout and passes with the change. It checks same-client connections, independent group titles, duplicate labels, reset, and unchanged colors. Grouping-disabled connections return an explicit error.
All 42 Chromium extension tests and 14 MCP capability/tab tests pass, as do the build and repository checks. A separate check verifies label limits, extension-only tool discovery, and the update error returned for an older protocol-v2 extension. The extension suite runs headed under Xvfb; Firefox and WebKit do not support this extension. The published
1.64.1package and macOS/Windows were not tested.The earlier #42360 is closed and was not merged.
Draft PR: #43827
Triaged on Linux by the Playwright bot - agent run