[
    {
        "role": "user",
        "content": "in%20claude%20code%2C%20what%20is%20difference%20between%20claude%20--resume%20and%20claude%20--continue%3F"
    },
    {
        "role": "assistant",
        "content": "Here\u2019s a clear breakdown of the difference between `claude --resume` vs. `claude --continue` in **Claude Code**, along with when and how to use each. My information is current as of April 2026.  \n  \n---\n\n## What are \u201csessions\u201d in Claude Code\n\n- Each time you work in Claude Code, it records a *session*, which captures the entire conversation history: your prompts, Claude\u2019s responses, any tool outputs, etc. ([code.claude.com](https://code.claude.com/docs/en/agent-sdk/sessions?utm_source=openai))  \n- Sessions are stored locally per project directory (within `~/.claude/projects/\u2026`) so you can later pick up where you left off. ([code.claude.com](https://code.claude.com/docs/en/best-practices?utm_source=openai))  \n\n---\n\n## `claude --continue`\n\n- **What it does**: Automatically resumes *the most recent* session within the *current project directory*. You don\u2019t need to remember any ID or name. ([code.claude.com](https://code.claude.com/docs/en/agent-sdk/sessions?utm_source=openai))  \n- **Ideal when**: You were working on something and simply closed Claude Code, and now you want to pick that up immediately.  \n- **Shortcut behavior**: It\u2019s a quick way to move forward with your last session, without any selection involved. ([code.claude.com](https://code.claude.com/docs/en/best-practices?utm_source=openai))  \n\n---\n\n## `claude --resume`\n\n- **What it does**: Gives you more control. It allows you to:\n  1. Resume by specifying a *session ID* or a *custom name*.  \n  2. Or run `claude --resume` by itself to see a UI list of past sessions to choose from. ([claudelog.com](https://claudelog.com/faqs/what-is-resume-flag-in-claude-code?utm_source=openai))  \n- **Ideal when**: \n  - You have more than one session in the directory and need to pick which one.  \n  - One of your sessions has a meaningful name you remember (you can name or rename sessions via `/rename`). ([code.claude.com](https://code.claude.com/docs/en/common-workflows?utm_source=openai))  \n\n---\n\n## Key Differences & Trade-offs\n\n| Feature | `--continue` | `--resume` |\n|---------|--------------|-------------|\n| How you pick the session | Automatically: picks the *most recent* in current directory | Manually: session picker or by specifying ID/name |\n| Needing to remember anything | No | Yes (if specifying) |\n| Use case when multiple sessions exist | Less control | More control |\n| Quickest for picking back up on last session | \u2705 | \u274c (unless you know the name/ID and want different session) |\n\n---\n\n## Session Management Tips\n\n- **Name your sessions early**: Using `/rename <name>` helps later when you want to use `--resume`. ([code.claude.com](https://code.claude.com/docs/en/common-workflows?utm_source=openai))  \n- **Project-aware**: Sessions are tied to project directories; working outside the original project or changing directories may interfere with using `--continue` to find the session. ([code.claude.com](https://code.claude.com/docs/en/common-workflows?utm_source=openai))  \n- **Known bug**: If you resume a session via the interactive `--resume` picker, `history.jsonl` (which `--continue` depends on to find \u201cmost recent\u201d) *does not* get updated. That means after using `--resume`, `--continue` may not pick up that session properly. ([github.com](https://github.com/anthropics/claude-code/issues/10063?utm_source=openai))  \n\n---\n\n## Recommendation: When to use which\n\n- Use `claude --continue` when:\n  - You want to jump back into the last thing you were working on, with no hassle.\n  - You\u2019re in the same project directory where you last ended a session.\n\n- Use `claude --resume` when:\n  - You want to resume a session from multiple you have, and remember which one.\n  - You\u2019ve named or have the ID of the session you want.\n  - You don\u2019t want vs. can\u2019t rely on \u201cmost recent\u201d being the right session.\n\n---\n\nIf you want, I can also walk you through how session names, IDs, and file paths are stored behind the scenes so you can better manage your sessions and avoid confusion."
    }
]