Open
Labels
enhancementNew feature or request
Description
Observation
Sessions start other sessions on their own: a running session calls claude -p from Bash, from whatever directory it is in, often its scratchpad under /tmp. Each such directory becomes a new folder under ~/.claude/projects/, and Switchboard lists it as a new project.
Measured on one workstation on 2026-10-09:
- 13 project folders under
~/.claude/projects/are named after a directory in/tmp; - 12 hold only
sdk-clitranscripts, between 1 and 5 each, and one is empty; - most were started from the scratchpads of two interactive sessions,
-tmp-claude-1000--home-…-workspace-<session-id>-….
Example: an interactive session ran claude -p "List the exact names of every skill available to you in this session…" with its scratchpad as working directory. The project /tmp/claude-1000/-home-…-workspace/<session-id>/scratchpad appeared in the sidebar with that one session.
What already covers part of it
#486 (merged, not released yet) hides sdk-* sessions by default, and the projects that hold nothing else. Every case measured above falls under it.
What it does not cover
- An interactive (
cli) session started in a throwaway directory still creates a project that stays listed after the directory is gone. - Nothing links such a session to the session that started it, so the sidebar cannot nest it under its parent the way Task subagents are nested.
- These launches come from what sessions do on their own (probes, delegated checks), and their frequency is likely to grow. Whether the CLI will mark them (a parent session id, a dedicated entrypoint) is unknown.
To watch
- Once (sidebar): hide sessions launched through the Agent SDK #486 is released: does the sidebar stay clean on a normal day? Count the folders under
~/.claude/projects/named after/tmp/directories, and how many of them stay listed. - New CLI versions: a field naming the parent session, or a launch directory outside
~/.claude/projects/, would let Switchboard nest these sessions or ignore them. - If listed noise remains, options to weigh:
- hide projects whose path no longer exists and whose sessions are all older than a threshold;
- treat directories under the system temp root as ephemeral;
- let one action archive every such folder at once ((sidebar): archiving a project folder hides the folder until a session appears in it #473).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
devsuitup commentedon Oct 28, 2026
Detect the throwaway origin from a parser signal (sdk/exec origin) so Codex exec sessions are covered too (#820).