[BUG] `--continue` cannot find sessions created by `-p` (interactive resume)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bare claude --continue (interactive resume) cannot find sessions created by claude -p. It reports "No conversation found to continue" even though the session exists on disk and claude --continue -p can find it.
This is a continuation of #43013, which was auto-closed for inactivity. I have now setup an automated regression check for every new Claude Code release, to prevent the overagressive autoclosure. This is absolutely a bug and a regression from earlier versions of Claude Code.
The original issue reported that both --continue and --continue -p were broken after v2.1.90. --continue -p has since been fixed, but bare --continue remains broken.
Root Cause
The v2.1.90 change "Changed --resume picker to no longer show sessions created by claude -p or SDK invocations" filters out -p sessions when --continue is used in interactive mode (all FDs are TTYs). The --continue flag should bypass this filter since its explicit purpose is to continue the most recent session regardless of how it was created.
Notably, when stdout/stderr are NOT TTYs (e.g., piped or redirected), --continue takes a different code path that does find the session but fails with a different error: "No deferred tool marker found". This confirms the session data is valid — only the interactive-mode filter is too aggressive.
What Should Happen?
claude --continue should find and resume the most recent session in the current directory, regardless of whether it was created by -p, SDK, or interactive use. If no session exists, it should error rather than silently doing nothing.
Steps to Reproduce
cd $(mktemp -d)
claude --max-turns 1 -p "The answer is 42. Reply only with: OK"
claude --continue # ← "No conversation found to continue"
Important: Must be run from a standalone shell (not from within a Claude session) with real TTYs on all FDs. Running via bash -c or with redirected stdout produces a different error ("No deferred tool marker"), masking the actual bug.
To reproduce from within an existing Claude session, run the test inside tmux:
#!/bin/bash
# run-continue-bug-in-tmux.sh
# Runs the repro in tmux so all FDs are real TTYs
SCRIPT='
cd $(mktemp -d)
echo "=== step 1: claude -p ==="
claude --max-turns 1 -p "The answer is 42. Reply only with: OK"
echo "=== step 2: bare --continue ==="
claude --continue
echo "=== step 3: --continue -p ==="
claude --continue -p "What is the answer?"
echo "=== DONE ==="
'
SESSION="continue-bug-test"
tmux kill-session -t "$SESSION" 2>/dev/null || true
tmux new-session -d -s "$SESSION" -x 200 -y 50 "zsh -i -c '$SCRIPT'"
tmux set -t "$SESSION" remain-on-exit on
while [ "$(tmux list-panes -t "$SESSION" -F '#{pane_dead}')" != "1" ]; do sleep 1; done
tmux capture-pane -t "$SESSION" -p -S -200
tmux kill-session -t "$SESSION" 2>/dev/null
Actual Output
=== step 1: claude -p ===
OK
=== step 2: bare --continue ===
No conversation found to continue ← BUG
=== step 3: --continue -p ===
42 ← Works correctly
=== DONE ===
Error Messages/Logs
- With real TTYs (standalone shell):
No conversation found to continue - Without real TTYs (piped/redirected):
No deferred tool marker found in the resumed session
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.89
Claude Code Version
2.1.220
Platform
Google Vertex AI
Operating System
Fedora 43
Terminal/Shell
zsh in tmux
Additional Information
--continue -pworks correctly — only bare--continue(interactive resume) is affected- The workaround
CLAUDE_CODE_ENTRYPOINT=sdk-clistill works but shouldn't be necessary - Session metadata on disk shows
entrypoint: "sdk-cli"regardless of how the session was created, confirming the data is correct — the filter logic is the problem - Previous issue: #43013 (auto-closed for inactivity, tracked this bug from v2.1.90 through v2.1.179)
Showing cached comments. Read the full discussion on GitHub ↗
7 Comments
<!-- daymark-continue-repro:2026-07-30 -->
Automated regression check — 2026-07-30T11:43:21Z
Claude Code version: 2.1.220
The
claude --continue(bare, interactive) bug still reproduces.Bare
claude --continuecannot find the session created byclaude -pand exits with code 1.claude --continue -pcorrectly finds and continues it.<!-- daymark-continue-repro:2026-07-31 -->
Automated regression check — 2026-07-31T11:36:37Z
Claude Code version: 2.1.220
Bare
claude --continuestill cannot find sessions created byclaude -p. Reproduced in a fresh temporary directory with real TTYs via tmux.Captured output:
Step 2 (
claude --continue) fails with "No conversation found to continue" while step 3 (claude --continue -p) correctly finds and continues the same session. Regression introduced in v2.1.90; workaround:CLAUDE_CODE_ENTRYPOINT=sdk-cli.<!-- daymark-continue-repro:2026-08-01 -->
Automated regression check — 2026-08-01T07:35:00Z — Claude Code v2.1.220
Bare
claude --continuestill fails on v2.1.220 (checked 2026-08-01T07:35:00Z). Note: the error message has changed from previous runs.Bare
--continueexits with code 1 (error message changed from "No conversation found to continue" to the above, but the regression persists).--continue -pcorrectly continues the session. Workaround:CLAUDE_CODE_ENTRYPOINT=sdk-cli.<!-- daymark-continue-repro:2026-08-03 -->
Automated regression check — 2026-08-03T07:36Z
Claude Code version: 2.1.220
Bare
claude --continuestill fails. Reproduced with real TTYs via tmux:--continue(interactive resume) exits 1;--continue -pcorrectly continues the session.<!-- daymark-continue-repro:2026-08-04 -->
Automated regression check — 2026-08-04T00:43Z — Claude Code v2.1.221
Bare
claude --continuestill cannot resume sessions created byclaude -p.Tested on v2.1.221 with real TTYs via tmux. Regression persists since v2.1.90.
<!-- daymark-continue-repro:2.1.222 -->
Automated regression check — 2026-08-05T00:29Z
Claude Code version: 2.1.222
Bare
--continuestill exits with code 1.--continue -pcontinues to work as a workaround.<!-- daymark-continue-repro:2.1.222 -->
Automated regression check — 2026-08-05T00:41Z
Claude Code version: 2.1.222
Bare
claude --continuestill cannot resume sessions created byclaude -p. Reproducer ran in tmux with real TTYs:Step 2 exits with code 1.
--continue -pcorrectly continues the same session.