You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Auto-assign sessions to groups based on working directory #59982
I have searched existing requests and this feature hasn't been requested yet
This is a single feature request (not multiple features)
Problem Statement
Problem
I work on multiple projects in parallel and use Claude Code's session groups to keep them organized in the sidebar. Today, the only automatic grouping is by fork lineage (/branch / --fork-session). Every fresh session I start in a project folder lands ungrouped, and I have to drag it into the right group manually.
With 3+ active projects, this becomes constant overhead — and easy to forget, which defeats the point of groups.
Why this matters
Session groups only deliver value if they reflect how I think about my work (per-project), and that mapping is stable and obvious — it's the folder I'm cd'd into. Manual assignment is the worst of both worlds: the data the system needs is already present, but it asks me to re-enter it every session.
Environment
Claude Code CLI on macOS (Darwin 25.3.0)
Model: Opus 4.7
Proposed Solution
Proposed solution
Let users map a working directory (cwd) to a group name in settings.json. When a session starts in (or under) that directory, it's automatically assigned to that group.
{
"sessionGroups": {
"/Users/berk/Desktop/myapp": "myapp",
"/Users/berk/code/acme-web": "acme",
"~/work/side-projects": "side"
}
}
Match should be longest-prefix wins, and ~ should expand.
Alternative (or complement)
Expose group assignment to the SessionStart hook so users can script arbitrary logic (e.g. derive group from git remote, branch name, or a .claude/group file):
{
"hooks": {
"SessionStart": [{
"hooks": [{ "type": "command", "command": "echo myapp" }],
"output": "sessionGroup"
}]
}
}
The hook's stdout becomes the group name.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon May 17, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
amorriscode commentedon May 20, 2026
You can group by project in the sidebar.
CleanShot.2026-05-20.at.14.35.32.mp4
github-actions commentedon Jul 10, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.