Magic Tools
Hands-OnBy CooconAugust 6, 2026608 views3 min read

Claude Code Says No conversation found to continue — Your -p Sessions Are Being Filtered Out

What the official docs say

The CLI reference gives --continue a very simple meaning: continue the most recent conversation in the current directory. No qualifiers — nothing about whether that session was started interactively or produced by a headless claude -p "..." run.

That is exactly the assumption many automation workflows are built on: scripts do the bulk work with -p, and when something needs a human, you drop into interactive mode with --continue to take over.

What actually happened

macOS + Claude Code v2.1.220, a clean empty directory, four steps (terminal is a real TTY):

$ claude --max-turns 1 -p 'The answer is 42. Reply only with: OK'
OK

$ claude --continue
No conversation found to continue        # ← BUG: the session clearly exists

$ claude -p --continue "What did I ask earlier?"
42                                        # ← headless continue works fine

$ CLAUDE_CODE_ENTRYPOINT=sdk-cli claude --continue
# ← interactive UI opens normally, with the -p session history fully loaded

Terminal transcript: claude -p returns OK, ls shows the session .jsonl sitting in ~/.claude/projects, bare claude --continue answers "No conversation found to continue", yet claude -p --continue recalls 42 from that same session

Typeset from the real run on v2.1.226 (2026-08-10) — commands and output are reproduced verbatim, only the colours and spacing are ours. The ls line is the point: the session file the interactive mode says it can't find is sitting right there on disk.

The contrast between steps 2 and 3 is the whole story: the same session data continues fine in headless mode but is "not found" in interactive mode. The session file sits happily in ~/.claude/projects/<project-path>/ as a .jsonl — we checked, and sessions created by -p live in the same place, in the same format, as interactive ones.

The trap: a filter applied one command too far

This is a regression introduced in v2.1.90. That release's changelog says: "Changed --resume picker to no longer show sessions created by claude -p or SDK invocations" — a reasonable product decision on its own (a picker full of one-shot scripted sessions is noisy).

The problem: that filter was also applied to --continue, whose semantics — continue the latest session — should not care how the session was created. So:

  • The most recent (or only) session in the directory was created by -p → interactive --continue filters it out → No conversation found to continue
  • The headless path -p --continue was fixed after an earlier issue (#43013) → works all along
  • The data layer is intact: session metadata, entrypoint fields, and jsonl content are all fine

The GitHub issue (#82536, reported on Fedora + tmux) and our macOS reproduction confirm each other — this is a cross-platform logic bug, not an environment quirk, present from v2.1.90 through v2.1.226 and counting.

Update 2026-08-10 — re-ran the same four steps on v2.1.226, which is the current latest on npm. Identical behaviour. v2.1.90 shipped on 2026-04-01, so the regression has now survived 114 published releases and just over four months, with the issue still open and no linked PR.

Two verified workarounds

1. Just need one follow-up question → headless continue (simplest)

claude -p --continue "Following up on that result, check X for me"

2. Need to take over interactively → prefix the environment variable

CLAUDE_CODE_ENTRYPOINT=sdk-cli claude --continue

The variable makes the CLI start as an SDK entrypoint, which bypasses the interactive session filter. In our test the interactive UI opened normally with full history loaded, and everything behaved like a regular session afterwards. Credit for discovering this goes to the issue author; we verified it works on macOS.

One debugging trap to know: if you run claude --continue through a pipe or redirect (stdout is not a TTY), the error message changes to No deferred tool marker found in the resumed session — the same bug wearing a different mask. Do not let it send you off hunting for "tool markers".

Scope and boundaries

  • Affects every version since v2.1.90 (first tested here on v2.1.220, the same version as the issue report; re-confirmed on v2.1.226, the current latest — unfixed, no linked PR)
  • Only interactive --continue/--resume discovery of -p/SDK sessions is affected; headless -p --continue is fine
  • Reproduced on both macOS and Fedora; model-independent
  • Inferred from the filtering mechanism (not separately tested): when a directory holds both an interactive session and a newer -p session, interactive --continue will skip the -p session and silently pick up the older interactive one — no error, but not the "latest" session you meant, which is sneakier than failing outright

Get field notes like this every Saturday

Subscribe to Dev Breakfast: daily AI coding picks at 8:00, plus a Saturday roundup of this week's hands-on tests with Claude Code / Codex / local models. Written in Chinese.

Related Articles

Claude Code "Prompt is too long" vs "maximum context length": Why Auto-Compact Works for One and Not the Other (Tested)

Claude Code decides a request was too long by matching the error text. If the backend says prompt is too long or input is too long for requested model, it auto-compacts the conversation and retries — invisible to you. DeepSeek and OpenAI-style gateways say This model's maximum context length is …, which it doesn't recognize: you get API Error: 400 on every turn. Manual /compact works; the better fix is to declare the real window with CLAUDE_CODE_MAX_CONTEXT_TOKENS (non-claude- model IDs) or CLAUDE_CODE_AUTO_COMPACT_WINDOW (claude- IDs) so it compacts before hitting the limit. Tested on Claude Code 2.1.285 against a local stub.

claude-codedeepseek+6
pitfallsOct 5, 20267 min
122

Claude Code Stuck on a Spinner With No Response: It Waits 6 Minutes per Attempt, and 10 Retries Can Hang It for Over an Hour (Tested)

When Claude Code spins without output or sits at Retrying in 0s, the backend is usually not sending anything. Tested on 2.1.285 (API key + ANTHROPIC_BASE_URL): with no response headers it waits 6 minutes (360 s) per attempt before timing out — setting API_TIMEOUT_MS to 600000 or 900000 doesn't change that; only lower values work. With the default 10 retries it can hang for over an hour. A gateway that buffers the reply until generation finishes will never deliver a reply that takes over 6 minutes. Press Esc to interrupt. All tested against a local stub.

claude-codetroubleshooting+5
pitfallsOct 5, 20269 min
102

Claude Code 429 "Request rejected (429)": How Long It Retries, and Why retry-after Over 60 Seconds Fails Instantly (Tested)

On a 429, Claude Code retries up to 10 times over about 3 minutes. If retry-after is 60 seconds or less it waits the full time (10 s and 60 s both recovered in testing); at 61 seconds or more it does not retry at all and fails immediately with API Error: Request rejected (429). Gateway messages such as new-api's are shown verbatim; an empty body shows status code (no body). In interactive mode every prompt sends 2 requests, so rate-limit usage doubles. All tested against a local stub on Claude Code 2.1.285.

claude-codetroubleshooting+4
pitfallsOct 4, 20268 min
99

Clash Verge TUN Mode Breaks All Internet Access: Hysteria2 Traffic Loops Back Into the TUN, and Tailscale Hijacks DNS

Clash Verge Rev 2.5.6 on macOS works fine in system-proxy mode, but as soon as TUN (virtual network adapter) mode is on, not even Baidu loads. Debugging through the mihomo core's API turned up two independent root causes stacked together. First, Hysteria2's outbound UDP isn't bound to the physical interface, so the TUN routes pull it back in and it loops. Second, Tailscale MagicDNS (100.100.100.100) has taken over system DNS, so queries go out through Tailscale's utun where Clash's dns-hijack can't see them, and come back poisoned. The fix is two Merge overrides: route-exclude-address to keep node IPs out of the TUN, and sniffer to recover domains from SNI. Every step comes with the commands and real output.

troubleshootingtailscale+7
pitfallsOct 4, 20266 min
101