Skip to main content
guidesSource-backed

Resuming, Branching, and Naming Claude Code Sessions

A practical walkthrough of managing Claude Code sessions: resuming with --continue, --resume, and --from-pr, naming sessions, using the session picker, branching to try a different approach, and where transcripts are stored.

by JPette1783·added 2026-06-05·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/sessions, https://github.com/JSONbored/awesome-claude/blob/main/content/guides/resuming-branching-and-naming-claude-code-sessions.mdx
Safety notes
Branching with /branch or --fork-session copies the conversation but permissions you approved with 'allow for this session' do not carry to the branch; re-approve as needed., Resuming the same session in two terminals without forking interleaves messages into one transcript; fork to keep them separate., Restoring or branching changes session state, not files on disk; use Git for permanent history.
Privacy notes
Transcripts are stored locally as JSONL at ~/.claude/projects/<project>/<session-id>.jsonl and removed after 30 days by default (cleanupPeriodDays)., Set CLAUDE_CONFIG_DIR to relocate session storage, or CLAUDE_CODE_SKIP_PROMPT_HISTORY to suppress transcript writes., Exported transcripts (/export) contain full messages and tool output; handle them like any sensitive log.
Author
JPette1783
Submitted by
JPette1783
Claim status
unclaimed
Last verified
2026-06-05

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

63

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Needs review

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    No reviewed flag detected in metadata.

    Pending

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

3 prerequisites to line up before setup.

0/3 ready
Install & runtime1Configuration1General1

Safety & privacy surface

Safety & privacy surface

3 safety and 3 privacy notes across 2 risk areas. Review closely: credentials & tokens.

2 areas
  • SafetyCredentials & tokensBranching with /branch or --fork-session copies the conversation but permissions you approved with 'allow for this session' do not carry to the branch; re-approve as needed.
  • SafetyCredentials & tokensResuming the same session in two terminals without forking interleaves messages into one transcript; fork to keep them separate.
  • SafetyCredentials & tokensRestoring or branching changes session state, not files on disk; use Git for permanent history.
  • PrivacyCredentials & tokensTranscripts are stored locally as JSONL at ~/.claude/projects/<project>/<session-id>.jsonl and removed after 30 days by default (cleanupPeriodDays).
  • PrivacyCredentials & tokensSet CLAUDE_CONFIG_DIR to relocate session storage, or CLAUDE_CODE_SKIP_PROMPT_HISTORY to suppress transcript writes.
  • PrivacyExecution & processesExported transcripts (/export) contain full messages and tool output; handle them like any sensitive log.

Safety notes

  • Branching with /branch or --fork-session copies the conversation but permissions you approved with 'allow for this session' do not carry to the branch; re-approve as needed.
  • Resuming the same session in two terminals without forking interleaves messages into one transcript; fork to keep them separate.
  • Restoring or branching changes session state, not files on disk; use Git for permanent history.

Privacy notes

  • Transcripts are stored locally as JSONL at ~/.claude/projects/<project>/<session-id>.jsonl and removed after 30 days by default (cleanupPeriodDays).
  • Set CLAUDE_CONFIG_DIR to relocate session storage, or CLAUDE_CODE_SKIP_PROMPT_HISTORY to suppress transcript writes.
  • Exported transcripts (/export) contain full messages and tool output; handle them like any sensitive log.

Prerequisites

  • Claude Code installed and used in a project directory at least once so a session exists.
  • Familiarity with running claude from your terminal.
  • Optional: edit access to settings for cleanupPeriodDays and transcript location.

Schema details

Install type
copy
Troubleshooting
No
Full copyable content
## Overview

A session is a saved conversation tied to a project directory. Claude Code stores
it locally as you work, so you can resume where you left off, branch to try a
different approach, or switch between tasks. This guide covers the CLI workflow.

## Resume

| Command | What it does |
| --- | --- |
| `claude --continue` | Resume the most recent session in this directory |
| `claude --resume` | Open the session picker |
| `claude --resume <name>` | Resume a named session directly |
| `claude --from-pr <number>` | Resume the session linked to a pull request |
| `/resume` | Switch conversations from inside a session |

Sessions started with `claude -p` or the Agent SDK do not appear in the picker
but can be resumed by passing their session ID to `claude --resume <id>`.

## Name your sessions

Descriptive names make sessions findable and resumable:

- At startup: `claude -n auth-refactor`
- During a session: `/rename auth-refactor`
- From the picker: highlight and press `Ctrl+R`
- On plan accept: the session is named from the plan content unless you already
  set a name

## Use the session picker

Run `/resume` (or `claude --resume`) to open the picker. Navigate with arrows,
`Space` to preview, `Ctrl+R` to rename, `Ctrl+A` to widen to all projects,
`Ctrl+W` to widen to all worktrees, and `Ctrl+B` to filter to the current branch.
You can paste a pull/merge request URL to find the session that created it.

## Branch a session

Branching copies the conversation so far and switches you into it, leaving the
original intact:

```text
/branch try-streaming-approach
```

From the command line, combine resume with fork:

```bash
claude --continue --fork-session
```

Forked sessions are grouped under their root in the picker. To return to the
original, resume it by ID or name.

## Manage context within a session

- `/clear` starts fresh with an empty context (the prior conversation is saved).
- `/compact [instructions]` replaces history with a summary.
- `/context` shows what is consuming context.

## Where session data lives

Transcripts are JSONL at `~/.claude/projects/<project>/<session-id>.jsonl`,
removed after 30 days by default (`cleanupPeriodDays`). Use `/export` to copy or
save a readable transcript. Set `CLAUDE_CONFIG_DIR` to relocate storage.

## Source

- Manage sessions: https://code.claude.com/docs/en/sessions

About this resource

Overview

A session is a saved conversation tied to a project directory. Claude Code stores it locally as you work, so you can resume where you left off, branch to try a different approach, or switch between tasks. This guide covers the CLI workflow.

Resume

Command What it does
claude --continue Resume the most recent session in this directory
claude --resume Open the session picker
claude --resume <name> Resume a named session directly
claude --from-pr <number> Resume the session linked to a pull request
/resume Switch conversations from inside a session

Sessions started with claude -p or the Agent SDK do not appear in the picker but can be resumed by passing their session ID to claude --resume <id>.

Name your sessions

Descriptive names make sessions findable and resumable:

  • At startup: claude -n auth-refactor
  • During a session: /rename auth-refactor
  • From the picker: highlight and press Ctrl+R
  • On plan accept: the session is named from the plan content unless you already set a name

Use the session picker

Run /resume (or claude --resume) to open the picker. Navigate with arrows, Space to preview, Ctrl+R to rename, Ctrl+A to widen to all projects, Ctrl+W to widen to all worktrees, and Ctrl+B to filter to the current branch. You can paste a pull/merge request URL to find the session that created it.

Branch a session

Branching copies the conversation so far and switches you into it, leaving the original intact:

/branch try-streaming-approach

From the command line, combine resume with fork:

claude --continue --fork-session

Forked sessions are grouped under their root in the picker. To return to the original, resume it by ID or name.

Manage context within a session

  • /clear starts fresh with an empty context (the prior conversation is saved).
  • /compact [instructions] replaces history with a summary.
  • /context shows what is consuming context.

Where session data lives

Transcripts are JSONL at ~/.claude/projects/<project>/<session-id>.jsonl, removed after 30 days by default (cleanupPeriodDays). Use /export to copy or save a readable transcript. Set CLAUDE_CONFIG_DIR to relocate storage.

Source

Source citations

Add this badge to your README

Show that Resuming, Branching, and Naming Claude Code Sessions is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/guides/resuming-branching-and-naming-claude-code-sessions.svg)](https://heyclau.de/entry/guides/resuming-branching-and-naming-claude-code-sessions)

How it compares

Resuming, Branching, and Naming Claude Code Sessions side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

2 trust signals differ across this comparison (Source provenance, Submitter).

Field

A practical walkthrough of managing Claude Code sessions: resuming with --continue, --resume, and --from-pr, naming sessions, using the session picker, branching to try a different approach, and where transcripts are stored.

Open dossier

Use Claude Code agent view (claude agents) to dispatch, monitor, peek, attach, and organize many background sessions from one terminal with state icons, PR labels, filters, and shell commands for fleet-style multitasking.

Open dossier

A practical walkthrough of Claude Code channels: how an MCP-server channel pushes messages, alerts, and webhooks into a running session, how to install and enable Telegram, Discord, or iMessage, sender allowlists, and enterprise controls.

Open dossier

Guide to /compact, /memory, and CLAUDE.md hygiene for long Claude Code sessions: when to compact, what to store in memory, and avoiding stale context.

Open dossier
Next steps
Trust
Review statusNot reviewedNot reviewedNot reviewedNot reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceDiffersSource-backedSubmission linkedSource submissionSource-backedSubmission linkedSource submission
SubmitterDiffersJPette1783kiannidevJPette1783kiannidev
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
Brand
Categoryguidesguidesguidesguides
SourceSource-backedSource-backedSource-backedSource-backed
AuthorJPette1783kiannidevJPette1783kiannidev
Added2026-06-052026-06-162026-06-052026-06-14
Platforms
Harness
Source repo
Safety notesBranching with /branch or --fork-session copies the conversation but permissions you approved with 'allow for this session' do not carry to the branch; re-approve as needed. Resuming the same session in two terminals without forking interleaves messages into one transcript; fork to keep them separate. Restoring or branching changes session state, not files on disk; use Git for permanent history.Background sessions run with the permission mode shown in the agent view header; review bypassPermissions and auto modes before dispatching unattended work. Deleting a session from agent view can remove Claude-created worktrees and uncommitted changes—commit or push first. Each dispatched session is a full Claude Code process; do not parallelize destructive tasks on the same checkout without isolation.Channel input is untrusted external content; treat incoming messages as data, not as instructions that should widen permissions. Events only arrive while the session is open; for unattended use, --dangerously-skip-permissions bypasses prompts and should be used only in trusted environments. Each channel keeps a sender allowlist; only paired/allowlisted IDs can push messages, and anyone who can reply can also approve permission relays if enabled, so allowlist only trusted senders.Compaction summarizes conversation history; verify summaries before relying on them for security-sensitive or release-critical decisions. Do not store secrets, credentials, or customer identifiers in `/memory` or CLAUDE.md. After compaction, re-validate repository state, test results, and open PR status before continuing destructive edits.
Privacy notesTranscripts are stored locally as JSONL at ~/.claude/projects/<project>/<session-id>.jsonl and removed after 30 days by default (cleanupPeriodDays). Set CLAUDE_CONFIG_DIR to relocate session storage, or CLAUDE_CODE_SKIP_PROMPT_HISTORY to suppress transcript writes. Exported transcripts (/export) contain full messages and tool output; handle them like any sensitive log.Agent view row summaries are generated by a Haiku-class model from session activity; treat summaries as operational hints, not sanitized exports for public sharing. Sessions started under different project directories appear in the default global list unless you filter with claude agents --cwd. Peek panels and attach mode expose full transcripts that may contain proprietary code, tokens, or customer data.A channel is an MCP server you configure with your own credentials; tokens are stored locally (for example ~/.claude/channels/telegram/.env). Incoming and outgoing messages pass through the third-party platform (Telegram, Discord, Apple Messages); review what data flows there. The iMessage channel reads your Messages database and requires Full Disk Access; understand that exposure before enabling it.Memory files persist across sessions and may be committed if stored in project scope. Compaction summaries can retain file paths, issue titles, and internal URLs—review before sharing session exports. Clear memory when offboarding contractors or rotating shared machines.
Prerequisites
  • Claude Code installed and used in a project directory at least once so a session exists.
  • Familiarity with running claude from your terminal.
  • Optional: edit access to settings for cleanupPeriodDays and transcript location.
  • Claude Code v2.1.139 or later (check with claude --version).
  • Multiple independent tasks that can run without watching every tool call.
  • Agreement on which directories, branches, or worktrees each session may edit.
  • Awareness that each background session consumes subscription quota independently.
  • Claude Code v2.1.80 or later, authenticated through claude.ai or a Console API key (channels are not available on Bedrock, Vertex AI, or Foundry).
  • Bun installed, since the channel plugins are Bun scripts.
  • On Team, Enterprise, or managed Console orgs, an admin must enable channels first.
  • An active long-running Claude Code session or multi-day task spanning several sessions.
  • A project with CLAUDE.md or memory files defining durable conventions.
  • Agreement on what may be written to user or project memory versus kept ephemeral.
  • Permission to run `/compact` and inspect resulting summaries before continuing work.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.