/resume should include background sessions (or add a separate picker for them)

Status Fixed / completed
Reported on v2.1.140
Maintainer reply ✓ Yes — claude[bot]
Activity 5 comments · opened May 13, 2026 · closed May 19, 2026
💡 Likely answer: A maintainer (claude[bot], contributor) responded on this thread — see the highlighted reply below.

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:

  1. Add a toggle to /resume (e.g. Ctrl+G — "show background / orphaned sessions") so the picker also lists them.
  2. Or add a separate command — e.g. /sessions — listing every JSONL under projects/ regardless of whether a jobs/ entry exists.
  3. 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

  1. Start a background session (/bg or claude --bg), let it finish.
  2. In claude agents, select it and press Ctrl+X Ctrl+X (delete).
  3. Open /resume — the session is not listed.
  4. Open claude agents — also not listed.
  5. 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

View original on GitHub ↗

5 Comments

r1pped · 3 months ago

+1 on this. The documentation states that deleted background sessions should still be accessible through claude --resume

Deleting removes the session from agent view and cleans up its [worktree](https://code.claude.com/docs/en/agent-view#how-file-edits-are-isolated), including any uncommitted changes in it, so push or commit work you want to keep before deleting. The conversation transcript stays on disk and remains available through claude --resume.

So I don't know if it's more of a feature request or just a bug. Having to manually search the filesystem for session ID is unintuitive

zentrolink-ivanzhukov · 3 months ago

Adding a data point that suggests this may actually be a documentation/behavior mismatch rather than a missing feature.

The official docs for claude agents state:

Deleting removes the session from agent view and cleans up its worktree, including any uncommitted changes in it, so push or commit work you want to keep before deleting. The conversation transcript stays on disk and remains available through claude --resume.

In practice, after Ctrl+X Ctrl+X on a background session in claude agents:

  • the transcript JSONL is indeed still on disk under ~/.claude/projects/<encoded-cwd>/<full-id>.jsonl,
  • but claude --resume (the interactive picker) does not list it — you can only revive it by knowing the full UUID and passing it explicitly: claude --resume <full-id>.

So the documented behavior ("remains available through claude --resume") and the actual UX (only available via raw UUID, not via the picker) are out of sync. This makes the case for treating this as a bug rather than a feature request — the user-visible promise of the docs isn't being delivered.

Any of the three options proposed above would close that gap; my preference would still be option 1 (toggle in /resume), as it keeps everything in one place.

maynestream-dev · 3 months ago

+1

Similarly, this affects the ability to meaningfully /branch a session too, which prevents important use cases inside agent view.

claude[bot] contributor · 3 months ago

This issue was fixed as of version 2.1.144.

github-actions[bot] · 1 month ago

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.