[BUG] Resuming a conversation by session ID broken in print mode

Resolved 💬 9 comments Opened Jun 11, 2025 by swerner Closed Jun 20, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.19 (Claude Code)
  • Operating System: macOS 145.5
  • Terminal: Ghostty

Bug Description

When attempting to resume a session by session ID in print mode like:
claude -p -r {session_id} "{prompt}"

I get an error of:
"No conversation found with session ID: {session_id}"

When running the command not in print mode like this it resumes the session correctly:
claude -r {session_id}

I would expect session ID to be usable regardless of the -p flag usage or not.

Steps to Reproduce

  1. claude -p "describe this project in 2 sentences" --output-format json
  2. Grab the session id that was output
  3. claude -p -r {session_id} "expand on that a bit" --output-format json

Expected Behavior

The previous session to continue further and output another blob of json

Actual Behavior

output of: No conversation found with session ID: {session_id}

Additional Context

It resumes the session just fine if I leave the -p flag off

View original on GitHub ↗

This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗