Currently Claude Code has two separate UIs for sessions:
/resume shows only interactive sessions. Background sessions (started via /bg or claude --bg) never appear in the picker — not even after their job entry has been deleted via Ctrl+X Ctrl+X in claude agents.
claude agents shows only sessions that have an active record in ~/.claude/jobs/<id>/. After Ctrl+X Ctrl+X the session disappears from there too.
Meanwhile the full JSONL transcript is still on disk at ~/.claude/projects/<encoded-cwd>/<full-session-id>.jsonl, and the session can be revived — but only by knowing the full session id and running from the shell:
claude --resume <full-session-id>
This is awkward: to return to a previously-existing background session you have to drop into the filesystem, grep transcripts and copy a UUID, instead of just picking it from a list.
Proposal — one of:
- Add a toggle to
/resume (e.g. Ctrl+G — "show background / orphaned sessions") so the picker also lists them.
- Or add a separate command — e.g.
/sessions — listing every JSONL under projects/ regardless of whether a jobs/ entry exists.
- Or add an "archived / orphaned" tab to
claude agents for sessions whose transcript still exists but whose job record has been deleted.
Any of these would close the gap: right now a background session is effectively unreachable from any UI after Ctrl+X Ctrl+X, even though the data is physically present on disk.
Repro
- Start a background session (
/bg or claude --bg), let it finish.
- In
claude agents, select it and press Ctrl+X Ctrl+X (delete).
- Open
/resume — the session is not listed.
- Open
claude agents — also not listed.
- The transcript
~/.claude/projects/<encoded-cwd>/<full-id>.jsonl is still on disk and claude --resume <full-id> opens it fine.
Environment
- Claude Code CLI version: 2.1.140
- Platform: Linux
Currently Claude Code has two separate UIs for sessions:
/resumeshows only interactive sessions. Background sessions (started via/bgorclaude --bg) never appear in the picker — not even after their job entry has been deleted viaCtrl+X Ctrl+Xinclaude agents.claude agentsshows only sessions that have an active record in~/.claude/jobs/<id>/. AfterCtrl+X Ctrl+Xthe session disappears from there too.Meanwhile the full JSONL transcript is still on disk at
~/.claude/projects/<encoded-cwd>/<full-session-id>.jsonl, and the session can be revived — but only by knowing the full session id and running from the shell:This is awkward: to return to a previously-existing background session you have to drop into the filesystem, grep transcripts and copy a UUID, instead of just picking it from a list.
Proposal — one of:
/resume(e.g.Ctrl+G— "show background / orphaned sessions") so the picker also lists them./sessions— listing every JSONL underprojects/regardless of whether ajobs/entry exists.claude agentsfor sessions whose transcript still exists but whose job record has been deleted.Any of these would close the gap: right now a background session is effectively unreachable from any UI after
Ctrl+X Ctrl+X, even though the data is physically present on disk.Repro
/bgorclaude --bg), let it finish.claude agents, select it and pressCtrl+X Ctrl+X(delete)./resume— the session is not listed.claude agents— also not listed.~/.claude/projects/<encoded-cwd>/<full-id>.jsonlis still on disk andclaude --resume <full-id>opens it fine.Environment