cmux-tui: workspace_group.create {reuse: true} finds the group by name instead of making one per member
Leo: "there are still hundreds of random sessions that i have 0 clue what are for plus you didnt do these groups well don't we have better acpmux commands for you guys yet"
His sidebar had about fifteen "Leads" groups holding one workspace each, and four "UI think tank" groups. Agents build groups with workspace_group_create {name} and then workspace_place per member, as the code-mode guide says. That op always makes a new group, so an agent that asked for "Leads" once per lane got one "Leads" per lane.
Change
workspace_group.createtakesreuse: true: the space's first group (in group order) whose name matches after trimming outer spaces, with case counted, answers the create, markedreused: true, and nothing is written. When no group has that name, one is made as before. Another space's group is never reused.- A create without
reusebehaves as before (a person's New Group may want a second group with the same name). cmux workspace group create --name N --reusesends it.- The code-mode guide tells agents to call
workspace_group_create {name, reuse: true}once, not once per member.
The app's own agent open --group path already joins an existing group by name and is unchanged here. Tidying the duplicates already on a sidebar and adding acpmux group commands are separate PRs.
Tests
state/group_reuse_tests.rs(red first, in the first commit): reuse answers the same group for"Leads"," Leads "and"Leads"; it makes the group when none matches, andleads(different case) is a different group; it never reuses another space's group; a plain create still makes a second group.cli/command.rs:--reusemaps toreuse: true, and a plain create sends noreuse.
Agent session: agent session
š¤ Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds workspace_group.create {reuse: true} so agents asking for a named group once per lane get the room's existing group of that name instead of a new one per lane. A create without reuse still makes a new group, so plain behavior is unchanged.
Key changes
- Reuse matches the room's first group by name (outer spaces trimmed, case counts); the matched group's plain snapshot answers the create.
reuseis declared in the operation catalog, and the SDK binding descriptors were resynced.cmux workspace group create --name N --reusesendsreuse: true.- The code-mode guide now tells agents to call
workspace_group_create {name, reuse: true}once, not once per member. - Reuse never answers a group from another space.