[BUG] Desktop: `claude --bg` sessions all land in "Other" when sidebar is grouped by Project, despite known cwd
What's wrong
In the desktop app's Code tab, with the sidebar set to Group by: Project, every session started from the terminal with claude --bg lands in one Other group. It doesn't matter that each one was launched inside a known project folder. Only sessions created from the app itself get sorted into project groups.
If you run background sessions across several projects, you end up with one long flat list, and project grouping stops being useful.
Steps to reproduce
- Open the desktop app (Code tab) with the sidebar grouped by Project, and Remote Control serving on for the project folders.
- In a terminal,
cdinto a project folder the app already knows about and runclaude --bg --name test-bg "hello". - The session shows up in the sidebar under Other, not under that project's group.
Evidence the folder is known
The CLI records the working directory for each background session. ~/.claude/sessions/<pid>.json has:
{
"kind": "bg",
"entrypoint": "cli",
"cwd": "/Users/<me>/<projects>/project-a",
"name": "test-bg",
"bridgeSessionId": "session_..."
}
The daemon roster (~/.claude/daemon/roster.json) has the same cwd. That path exactly matches a folder the app already groups its own sessions under. On my machine, 13 of 13 background sessions sit in Other, even though their cwd values point to three different project folders the app already knows.
Custom groups don't help either. These sessions aren't returned by the app's session list, so there's no way to file them into a group.
Expected
Background and CLI-started sessions should be grouped by their cwd, the same way app-created sessions are. Sessions should fall back to Other only when no folder is known.
Environment
- Claude desktop app 2.16120.0 (macOS 15.7.7)
- Claude Code CLI 2.1.285
- Sidebar: Group by Project, Status Active, Sort by Recency