VS Code extension: programmatic session groups (create groups and assign sessions to them)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The VS Code extension's session list supports groups, but a session can only be placed in a group by hand: drag it onto a group, or use "Add Session Tab to Group" on the session tab. Everything else lands in "Ungrouped".
There is no way to create a group or assign the current session to one from a slash command, a hook, a launch flag or a setting. The title has /rename; the group has no equivalent. The information that decides the right group is usually already known to a skill, hook or script at the start of a session, but it cannot be acted on, so the list has to be tidied by hand or left ungrouped.
Proposed Solution
Make session groups scriptable. Any of these would do, and they could coexist:
- A slash command, for example /group <name>, that creates the group if it does not exist and moves the current session into it (the counterpart of /rename for the title).-
- A field that a hook can return (SessionStart or UserPromptSubmit), or a CLI flag at launch, that sets the session's group.-
- A setting that derives the group automatically, for example from the working directory or from a pattern in the session title.
Alternative Solutions
Today: create groups by hand and move each new session with "Add Session Tab to Group" or drag-and-drop, or encode the group in the title with /rename and scan for it. Both work but need a manual step per session.
Related requests on other surfaces, none covering the VS Code extension or a scriptable route: #95164 asks for /tag and --tag with grouping by tag in the claude agents view; #99285 notes the agents view already carries a disabled custom-group system (agents:setGroup); #90107, #89468, #89623 and #102318 ask for sidebar or picker grouping derived from the sub-project or working directory. The same capability exposed to the VS Code extension's session groups would answer this request.
Priority
High - Significant impact on productivity
Feature Category
Developer tools/SDK
Use Case Example
One VS Code window open on a large workspace that holds many sub-projects, with sessions started for each of them over the weeks.
A skill or hook at the start of each session already knows which sub-project it belongs to. With a /group command or a hook-settable group, every session would be filed under its sub-project automatically, and the session list would read as a set of collapsible groups instead of one long "Ungrouped" list.
Extension version: anthropic.claude-code 2.1.300 on macOS; the manifest contributes claude-vscode.addSessionTabToGroup and claude-vscode.renameSessionTab, and there is no claudeCode.* setting for grouping.
Additional Context
_No response_