[BUG] `--continue` cannot find sessions created by `-p` (interactive resume)

Status Open
Reported on v2.1.89
Maintainer reply None cached
Activity 14 comments · opened Jul 30, 2026

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 -p works correctly — only bare --continue (interactive resume) is affected
  • The workaround CLAUDE_CODE_ENTRYPOINT=sdk-cli still 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)

View original on GitHub ↗

7 Comments

not-stbenjam · 1 month ago

<!-- 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.

=== step 1: claude --max-turns 1 -p "The answer is 42. Reply only with: OK" ===
OK

=== step 2: bare claude --continue ===
No conversation found to continue      ← BUG (exit code 1)

=== step 3: claude --continue -p "What is the answer?" ===
42                                      ← Works correctly

=== DONE ===

Bare claude --continue cannot find the session created by claude -p and exits with code 1. claude --continue -p correctly finds and continues it.

not-stbenjam · 1 month ago

<!-- daymark-continue-repro:2026-07-31 -->

Automated regression check — 2026-07-31T11:36:37Z

Claude Code version: 2.1.220

Bare claude --continue still cannot find sessions created by claude -p. Reproduced in a fresh temporary directory with real TTYs via tmux.

Captured output:

=== step 1: claude --max-turns 1 -p ===
OK
=== step 2: bare claude --continue ===
No conversation found to continue
=== step 3: claude --continue -p ===
42
=== DONE ===

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.

not-stbenjam · 29 days ago

<!-- daymark-continue-repro:2026-08-01 -->

Automated regression check — 2026-08-01T07:35:00Z — Claude Code v2.1.220

Bare claude --continue still fails on v2.1.220 (checked 2026-08-01T07:35:00Z). Note: the error message has changed from previous runs.

=== step 1: claude --max-turns 1 -p ===
OK

=== step 2: bare claude --continue ===
Error: No deferred tool marker found in the resumed session. Either the session was not deferred, the marker is stale (tool already ran), or it exceeds the tail-scan window. Provide a prompt to continue the conversation.
(exit 1)

=== step 3: claude --continue -p "What is the answer?" ===
42

=== DONE ===

Bare --continue exits with code 1 (error message changed from "No conversation found to continue" to the above, but the regression persists). --continue -p correctly continues the session. Workaround: CLAUDE_CODE_ENTRYPOINT=sdk-cli.

not-stbenjam · 27 days ago

<!-- daymark-continue-repro:2026-08-03 -->

Automated regression check — 2026-08-03T07:36Z

Claude Code version: 2.1.220

Bare claude --continue still fails. Reproduced with real TTYs via tmux:

=== step 1: claude --max-turns 1 -p ===
OK
(step 1 exit code: 0)

=== step 2: bare claude --continue ===
No conversation found to continue
(step 2 exit code: 1)

=== step 3: claude --continue -p ===
42
(step 3 exit code: 0)

=== DONE ===

--continue (interactive resume) exits 1; --continue -p correctly continues the session.

not-stbenjam · 27 days ago

<!-- daymark-continue-repro:2026-08-04 -->
Automated regression check — 2026-08-04T00:43Z — Claude Code v2.1.221

Bare claude --continue still cannot resume sessions created by claude -p.

=== step 1: claude --max-turns 1 -p ===
OK
(step 1 exit code: 0)

=== step 2: bare claude --continue ===
No conversation found to continue
(step 2 exit code: 1)

=== step 3: claude --continue -p ===
42
(step 3 exit code: 0)

=== DONE ===

Tested on v2.1.221 with real TTYs via tmux. Regression persists since v2.1.90.

not-stbenjam · 26 days ago

<!-- daymark-continue-repro:2.1.222 -->

Automated regression check — 2026-08-05T00:29Z
Claude Code version: 2.1.222

=== step 1: claude --max-turns 1 -p ===
OK
(step 1 exit code: 0)

=== step 2: bare claude --continue ===
No conversation found to continue
(step 2 exit code: 1)

=== step 3: claude --continue -p ===
(not reached — step 2 confirms regression)

=== DONE ===

Bare --continue still exits with code 1. --continue -p continues to work as a workaround.

not-stbenjam · 26 days ago

<!-- daymark-continue-repro:2.1.222 -->
Automated regression check — 2026-08-05T00:41Z

Claude Code version: 2.1.222

Bare claude --continue still cannot resume sessions created by claude -p. Reproducer ran in tmux with real TTYs:

=== step 1: claude --max-turns 1 -p ===
OK
(step 1 exit code: 0)

=== step 2: bare claude --continue ===
No conversation found to continue
(step 2 exit code: 1)

=== step 3: claude --continue -p ===
42
(step 3 exit code: 0)

=== DONE ===

Step 2 exits with code 1. --continue -p correctly continues the same session.

Showing cached comments. Read the full discussion on GitHub ↗