claude-code - 💡(How to fix) Fix /resume should include background sessions (or add a separate picker for them) [2 comments, 2 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#58725Fetched 2026-05-14 03:41:04
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
1
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

Code Example

claude --resume <full-session-id>
RAW_BUFFERClick to expand / collapse

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

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