claude-code - 💡(How to fix) Fix Group recent sessions in sidebar by project / working directory [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56067Fetched 2026-05-05 05:59:03
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

Problem When working on multiple projects at the same time, the Recent Sessions list in the left sidebar mixes sessions from all working directories together, sorted only by recency. It's easy to resume the wrong session and start editing in the wrong repo, or to lose track of which in-flight session belongs to which project.

Requested behavior Add a way to organize recent sessions in the sidebar by project (cwd / git repo root):

  • Group sessions under collapsible project headers (path or repo name), with sessions inside each group sorted by recency.
  • Or a toggle/setting to switch between "Sort by recency" (current) and "Group by project".
  • Optional: filter to show only the current project's sessions, or pin a project to the top.
  • Show the project name/path on each session row regardless of grouping mode, so the active project is always unambiguous.

Why it matters

  • Prevents cross-project mistakes (editing/committing in the wrong repo).
  • Makes parallel work across repos viable without constantly re-reading paths.
  • Matches how IDEs (VS Code, JetBrains) already organize recent workspaces.

Environment

  • Claude Code CLI on macOS (Darwin 25.4.0)

extent analysis

TL;DR

Implement a grouping feature in the Recent Sessions list to organize sessions by project, allowing users to differentiate between sessions from various working directories.

Guidance

  • Consider adding a toggle or setting to switch between sorting by recency and grouping by project to accommodate different user preferences.
  • Introduce collapsible project headers with sessions sorted by recency within each group to improve session management.
  • Display the project name or path on each session row to ensure the active project is always clear, regardless of the grouping mode.
  • Explore filtering options to show only the current project's sessions or pin a project to the top for enhanced usability.

Example

No specific code example can be provided without more context, but the solution might involve modifying the UI component responsible for rendering the Recent Sessions list to include grouping and filtering functionality.

Notes

The implementation details may vary depending on the underlying technology stack and the existing architecture of the Claude Code CLI. This solution assumes that the necessary data (e.g., project paths, session information) is available and can be leveraged to implement the requested features.

Recommendation

Apply a workaround by manually organizing sessions using external tools or notes until a formal grouping feature is implemented, as this will help mitigate the issue of mixing sessions from different projects.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Group recent sessions in sidebar by project / working directory [1 participants]