[GH-ISSUE #15331] Support --resume and --continue flag for resuming Claude Code sessions launched via ollama launch claude #71867

Closed
opened 2026-05-05 02:46:36 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Lftobs on GitHub (Apr 4, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15331

Problem

  • When launching Claude Code with ollama launch and then exiting, attempting to resume the session with a --resume flag fails:
    • Error observed: Error: unknown flag: --resume
  • This prevents reattaching to interactive code sessions, breaking workflows that expect long-lived, resumable development sessions.

Why this change matters

  • Resumable sessions are essential for developer productivity....users often start a session, do work, exit the client, and later want to reattach to the same context without losing state.
  • Without a resume mechanism, users would have to recreate session/conversation (files, context, conversation history), which leads to context flow break and reduces adoption of the interactive Claude Code experience in Ollama.

How the change will be used

  • CLI usage example:
    • ollama launch claude --resume <session_id> or ollama launch claude --continue
    • Expected behavior:
      • The CLI recognizes the --resume flag or resume subcommand.
      • It locates the session, re-establishes the program state, and restores the interactive context (conversation history, open files, relevant model state).
      • If the session cannot be resumed (expired, missing, incompatible), a clear error message is returned with guidance.
Originally created by @Lftobs on GitHub (Apr 4, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15331 ### Problem - When launching Claude Code with `ollama launch` and then exiting, attempting to resume the session with a `--resume` flag fails: - Error observed: `Error: unknown flag: --resume` - This prevents reattaching to interactive code sessions, breaking workflows that expect long-lived, resumable development sessions. ### Why this change matters - Resumable sessions are essential for developer productivity....users often start a session, do work, exit the client, and later want to reattach to the same context without losing state. - Without a resume mechanism, users would have to recreate session/conversation (files, context, conversation history), which leads to context flow break and reduces adoption of the interactive Claude Code experience in Ollama. ### How the change will be used - CLI usage example: - `ollama launch claude --resume <session_id> or ollama launch claude --continue` - Expected behavior: - The CLI recognizes the `--resume` flag or `resume` subcommand. - It locates the session, re-establishes the program state, and restores the interactive context (conversation history, open files, relevant model state). - If the session cannot be resumed (expired, missing, incompatible), a clear error message is returned with guidance.
GiteaMirror added the feature request label 2026-05-05 02:46:36 -05:00
Author
Owner

@rick-github commented on GitHub (Apr 4, 2026):

ollama launch claude -- --resume <session_id> 
<!-- gh-comment-id:4187775475 --> @rick-github commented on GitHub (Apr 4, 2026): ``` ollama launch claude -- --resume <session_id> ```
Author
Owner

@Lftobs commented on GitHub (Apr 4, 2026):

thanks

<!-- gh-comment-id:4187851429 --> @Lftobs commented on GitHub (Apr 4, 2026): thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#71867