Single logo
  • Courses
  • Blog
  • About
Join on SkoolJoin on Skool

In this topic

Claude
  • Claude.ai Interface Tour: Every Control You Need on One Screen
  • The AI Fluency Model: Delegation, Description, Discernment and Diligence
  • Working With Claude: Pick the Surface, Match the Model, Keep the Context Clear
  • Claude's Four Entry Points: Choose Chat, Projects, Artifacts or Research Before You Type
  • What Claude Can Do: Extended Thinking, Web Search, Artifacts and File Analysis
  • Getting More From a Claude Chat: Steer the Conversation Instead of Starting Over
  • Claude Research Mode End to End: From One Prompt to a Cited Briefing
  • Claude's Capability Layer: When to Use Skills, Code Execution or Memory
  • Code Execution and File Creation in Claude: Calculated Numbers and a Real Excel File
  • Adding and Using Skills in Claude: Let Claude Pick the Skill, Then Teach It Your Format
  • Claude Memory, Curation and Incognito: Keep What Helps, Remove What Has Gone Stale
  • Claude Styles, Preferences and Project Instructions: Three Dials, Three Scopes
  • Claude Projects: Knowledge, Instructions and a Real Workspace You Set Up Once
  • Keeping a Claude Project Current and Connected: Refresh, Prune and Grant the Least
  • Claude Scheduled Tasks: Let Claude Work on a Schedule and Email You the Result
  • Claude Code and Claude for Chrome: What They Are and Who They Are For
  • Anatomy of a Good Prompt: Role, Context, Task, Format and Examples
  • Shaping Claude's Output: Format, Tone and Length in a Few Words
  • Iterating and Refining a Prompt: Read, Diagnose, Adjust, Repeat
  • Five Prompting Patterns for Work: Summarise, Extract, Rewrite, Classify and Draft
  • Why Evaluating AI Output Matters Most: Trust, Then Verify
  • Spotting AI Hallucinations and Fabrications: Four Tells and Where Risk Spikes
  • Fact-Checking Claude's Answers: Four Techniques and a Line-by-Line Claim Log
  • Judging AI Output Quality: Four Questions That Score Any Answer
  • Adapting AI Output for Your Audience: One Answer, Three Readers
  • When a Human Must Review AI Output Before It Ships
  • A Personal Validation Checklist for AI Output: Six Lines, Any Draft
  • Fitting Claude Into Real Work: Where It Helps and Where It Never Should
  • Breaking Big Tasks Into Steps With Claude: Small Asks, Checked Hand-offs
  • Designing a Repeatable Claude Workflow: A Reusable Weekly Report Template
  • Measuring If Claude Is Actually Working: One Number, Before and After
  • Communicating AI Value and Limitations to Stakeholders: The Honest Pitch
  • Data Privacy With Claude: What Never Goes in a Prompt, and How to Redact a Document Before You Paste It
  • Responsible AI Use and Transparency: Helpful, Honest, Harmless, and One Honest Line
  • Troubleshooting a Weak Claude Answer: Name the Cause, Fix One Thing, Then Make It Cheaper
  • CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages
  • Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It
  • One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI
  • Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges
  • Hooks That Block Destructive Actions: a PreToolUse Gate That Allows, Asks or Denies
  • Choosing a Claude Code Extension: Skill, Hook, Rules File, Subagent, Slash Command or Plugin
  • Rolling Out Claude Code to a Team: Settings Precedence, dontAsk in CI, a Hook for Every-Time Rules and a Plugin for Five Repos
  • A Claude Code Review Bot in CI: Headless -p, JSON Findings, Team Rules in Git and a Person on the Merge
  • Lab: Three Planted Bugs in a Claude Code CI Repo, a Permission Mode, a Plugin Path and an MCP Token Variable
  • Configuring MCP Servers in Claude Code: A Command or a URL, Three Scopes, and Three Moves When One Breaks
  • Claude Code's Built-in Tools: Read, Write, Edit, Bash, Grep and Glob, and When Each One Is the Right Pick
  • The CLAUDE.md Hierarchy: User, Project and Directory Files, How They Stack, and the Team Rule Stuck on One Laptop
  • Split a 600-Line CLAUDE.md: @import Lines, .claude/rules Files and Which One to Pick
  • Path-Specific Rules in Claude Code: paths Globs, When a Rule Loads and the Glob That Matches Nothing
  • Claude Code Slash Commands and Skills: Project vs User Scope, $ARGUMENTS, context: fork and allowed-tools
  • Iterative Refinement with Claude Code: Input/Output Examples, Tests First and the Interview Pattern
  • Claude Code Sessions: Resume by Name, Fork From a Baseline, or Start Fresh With a Summary Card
  • CI Reviews That Don't Repeat Themselves: Prior Findings, Existing Tests and Test Standards in CLAUDE.md
  • The Claude Messages API: Your First Call, Field by Field
  • Claude Tool Use: How tool_use and tool_result Work in the Messages API
  • Claude Client SDKs Wrap One REST API: Raw HTTP, Python, TypeScript and Async Calls Compared
  • Anthropic SDK Timeouts, Retries and Error Classes: Configure the Client Once, Then Give 429, 529, 400 and Timeouts Their Own Move
  • Claude Streaming Events: The Event Order, message_stop, Tool Arguments, Stop Reasons and a WebSocket Relay
  • Images, PDFs and Thinking Blocks in the Claude Messages API: Typed Blocks In, Typed Blocks Out
  • Getting Data Into Claude: PDF Documents, the Files API, Search Results and Citations
  • Opus, Sonnet or Haiku: Pick the Claude Model per Job, and Test the Request When a New Release Arrives
  • Adaptive Thinking and Effort in Claude: Two Dials, Set per Workload, and the Thinking Block You Must Pass Back
  • Claude Cost Tracking From usage: Count Before, Cap During, Read After, Then Find the Line That Drives the Bill
  • Claude Cache Breakpoints: Where to Put cache_control, How to Move It With the Chat, and Why the Reads Stay at Zero
  • Claude Message Batches or Real Time: Choose by Who Is Waiting, Match by custom_id, Resend Only the Failures
  • Calling Claude Through Amazon Bedrock, Google Cloud and Microsoft Foundry: Same Call, Different Door
  • The Life Cycle of a Claude App: Six Phases, a Model That Retires, and a Release Gate for Every Change
  • Pinning Claude Model IDs and Upgrading Safely: One Change at a Time, a Golden-Set Replay and a Staged Rollout
  • Content Boundaries and Schema Design for Claude: Fence the Input in a Tag, Let the Output Say I Don't Know
  • The Agentic Loop and stop_reason: Keep Turning on tool_use, Stop on end_turn, Cap the Turns
  • The Claude Agent SDK: query(), ClaudeAgentOptions and @tool, in Python and TypeScript
  • Fix the Agent: Four Broken Claude Agent SDK Configs, From the Symptom to the One Wrong Line
  • Claude Managed Agents: Cloud Sandbox, Self-Hosted Sandbox or Self-Hosted Service
  • Agent SDK Hooks for Deterministic Actions: PreToolUse, PostToolUse, and Four Hooks That Fail Silently
  • Memory and Context-Window Patterns for Claude Agents: Context Editing, Compaction and the Memory Tool
  • Reading an Agent Trace: Five Signatures, Five Missing Patterns, and How Long a Fact Must Live
  • Tool Descriptions for Claude: How Claude Picks a Tool, and How to Stop It Picking the Wrong One
  • Tool Input Schemas and Error Responses for Claude: Required Fields, Enums, is_error and a Retry Flag
  • Tool Response Shaping and a Lean Tool Set: Give Claude a Sticky Note, Not the Filing Cabinet
  • Fix the Tool Schema: Read the Trace, Fix the Card, Re-Run (Four Real Schema Bugs)
  • Client Tools, Server Tools and Approval Gates: Who Runs the Tool, and Who Says Yes First
  • Built-in Tool, Custom Tool, Skill or MCP Server? Pick the Lightest One That Fits
  • System Prompt or User Turn: Where Each Instruction Goes, and Output Limits Your Code Enforces
  • Refine the Prompt One Line at a Time, Then Clean and Fence the Customer's Text
  • Prompt Revision Driven by Evals: Name the Cause, Change One Thing, Rerun the Whole Suite
  • Long-Running Sessions: Compact, Prune, Isolate or Start Fresh, Decided by Naming the Failure
  • Context Isolation Through Subagents: Read the Logs Elsewhere, Keep One Line
  • Defensive Parsing of Claude Replies: Check the Stop Reason, Read the Block or the Text, Then Validate the Values
  • Full Context or Retrieval: Choose by Corpus Size, Cost and Freshness
  • Skepticism Toward Confident Output: Check the Quote, the Record and the Sum Before You Send
  • Debugging a Claude App: Three Error Types, the Recovery Each One Earns, and the First Failing Row
  • Six Ways a 200 Can Still Be Wrong: Hallucination, Refusal, Under-Acting, Context Loss, Format Drift and Inconsistency
  • Fix the Cause, Not the Symptom: Four Recovery Drills for an LLM App, Each Checked on a New Input
  • Integration Layer or Model Output? Three Taps and Three Questions to Find Where a Wrong Answer Lives
  • Which Test Layer Owns the Failure? Unit, Functional, Integration and End-to-End Tests for a Claude App
  • Designing an Overnight Document Pipeline on Claude: Batch Lane, Live Lane, a Cached Prefix and a custom_id Reconcile
  • Proving a Model Upgrade Is Ready: A Frozen Golden Set, a Calibrated Judge, the Right Layer and a Release Gate
  • From Requirement to Design for a Claude App: Eight Requirements, Five Elements and a Trace With No Gaps
  • Build a Claude Refund App: the Messages API, Two Tools, an MCP Server and a Hook in One Loop
  • Ship a Claude App: an Eval Gate, Two Guardrail Layers, a Cost Check From usage and a Pinned Model
  • Lab: a 30-Case Golden Set, a Calibrated Judge and a Per-Slice CI Gate on a Claude Refund App
  • Lab: Cut a Claude App's Bill by 62 Percent With Usage Data, Layered Cache Breakpoints and a Batch Job
  • Lab: Three Planted Bugs in a Claude App, a Vague Prompt, a Mistyped Tool Schema and a Broken Stream Handler
  • Lab: Three Planted Bugs in a Claude Code CI Repo, a Permission Mode, a Plugin Path and an MCP Token Variable
  • Lab: Harden a Claude App, an Uncalibrated Judge, a Retry Loop That Retries Everything and a Hook Matcher With a Gap
  • Lab: Turn a Claude App Into a Reusable Template, One Pinned Model Id, No Key in Code and Evals Built From Data
  • Building an MCP Server: Tools, Resources and Prompts in Python and TypeScript
  • MCP Transports: stdio or Streamable HTTP, and Who Starts the Server
  • Deploying and Authenticating an MCP Server: Environment Keys for stdio, Bearer Tokens and Scopes for HTTP
  • Validation-Retry Loops for Claude Extraction: Send Back the Exact Errors, and Stop When a Retry Cannot Help
  • Multi-Pass and Multi-Instance Code Review with Claude: A Fresh Reviewer, Per-File Passes and an Integration Pass
  • When a Claude Support Agent Should Escalate: Three Clear Triggers, Not Mood or a Confidence Score
  • Error Propagation Across Subagents: Retry Locally, Then Report the Failure, the Attempts and What You Found
  • Human Review and Confidence Calibration: Check Accuracy by Type and Field Before You Stop Looking
  • Provenance in Multi-Source Research: Keep Every Claim With Its Source and Date, and Show Conflicts Instead of Settling Them
  • Lab: An Extraction Pipeline With a Nullable Schema, Validation-Retry, a 100-Request Batch and Human Review
  • Lab: A Research Pipeline With Parallel Subagents, a Timeout That Keeps Its Partial Results, and a Report With Its Trail
  • Coordinator and Subagents: Decompose, Delegate, Check Coverage, and Call Only the Spokes You Need
  • Passing Context to Subagents: Nothing Is Inherited, So Put Findings, Goal and Criteria in the Prompt
  • Parallel Subagents: Several Task Calls in One Response, Every Result Back in One User Turn
  • Task Decomposition: a Fixed Prompt Chain With an Integration Pass, or a Dynamic Plan That Adapts
  • Prompt Guidance vs Programmatic Gates: Block the Refund Until the Customer Is Verified, Then Hand Off a Card That Stands Alone
  • Scoped Tools per Agent and tool_choice: Three to Five Tools per Role, a Shared One, and auto, any or a Forced Tool
  1. Blog
  2. /
  3. Claude
  4. /
  5. Claude Code

Claude Code Sessions: Resume by Name, Fork From a Baseline, or Start Fresh With a Summary Card

You investigate a refund bug on Monday and come back on Tuesday after a teammate edited the code. Resume the named session and say which files changed, fork it to compare two fixes, or start fresh from a summary card when the old tool results are stale.

Chaand Sheikh

·27 November 2026Claude Code

What you will learn

  • Name a Claude Code session with -n and bring it back with --resume or --continue
  • Tell a resumed session exactly which files changed, so only those are read again
  • Branch two approaches from one analysis with --fork-session or the SDK's resume and fork_session
  • Decide when a summary card and a fresh session beat resuming with stale tool results

Before you start

  • Running Claude Code in a terminal
  • What a tool result is in an agent conversation

On Monday you spend an hour in Claude Code working out why refunds fail in your support agent's code. Claude reads refund.py, then orders.py, and you note a finding: the refund check runs before the order lookup. Overnight, a teammate edits the code. On Tuesday you ask the same question again.

What Claude remembers is how the files looked yesterday. So you have three choices: carry on with the same conversation, make a copy of it, or begin again with a short brief. Claude Code has a command for each, and picking the right one is mostly about one question: are the old tool results still true?

A case file, a photocopy, a one-page brief

Think of a detective with a case file. Resume is opening the same file and carrying on. Fork is a photocopy: you test one theory on each copy, and the original stays clean. And when the notes are out of date, you hand a new detective a one-page brief, facts only.

Three ways to continue a session Monday: refund-bug refund.py + orders.py read Resume same conversation context mostly true say which files changed Fork branch A and branch B one shared baseline original stays as it was Fresh + summary new session starts from a card tool results read today
Same case file, a photocopy, or a one-page brief.

Name it, then resume by name

The lecture's project is a cheat sheet, commands.md, and a summary template. Here are the three CLI lines from it, in the order you use them:

claude -n refund-bug
# day 1: investigate, then close the terminal

claude --resume refund-bug
# day 2: the same conversation, found by its name

claude --continue
# or: the most recent conversation in this folder
  • -n refund-bug (or --name) names the session when you start it.
  • --resume refund-bug (or -r) brings back exactly that conversation the next day.
  • --continue (or -c) needs no name. It takes the latest conversation in this folder.

A name pays off when you run more than one investigation in the same folder. With --continue you get whichever one was last, which may not be the one you meant.

There's one catch. When you resume, everything comes back, and that includes the old tool results. The file contents Claude read on Monday are still sitting in the conversation, and Claude has no way to know they're out of date.

Tell it exactly what changed

Your resumed session remembers three files: refund.py, orders.py and policy.json. Overnight, refund.py and policy.json were edited. orders.py is the same.

Targeted re-analysis What the session remembers refund.py: changed orders.py: same policy.json: changed What you type on day 2 refund.py and policy.json changed overnight. Re-read those two and update your findings. orders.py is the same.
Two files read again, not the whole project.

Claude can't see the edits on its own, so you tell it. The project's PROMPT.md has the message:

I resumed the refund-bug session. refund.py and policy.json changed since you read them. Re-read only those two files and update your findings.

This is targeted re-analysis. Two files get a second look, and the work from Monday on orders.py is kept. If you say nothing, the session keeps trusting yesterday's results. If you ask it to re-explore everything, you throw away the part of Monday's work that is still true.

Fork: two branches from one baseline

Now say the analysis is finished and you can see two ways to fix the code. Branch A tries a guard function. Branch B moves the rules into a table. Both should start with everything the analysis learned, and neither should spoil the other.

That shared analysis is your baseline, and a fork gives each idea its own copy of it. You compare the results (in the lecture, A is short and easy to read, B is easier to extend), keep the better one, and the original refund-bug session stays exactly as it was.

There are two ways to fork. In the terminal, add --fork-session to a resume:

claude --resume refund-bug --fork-session

In the Agent SDK (Python), the same three moves are options on ClaudeAgentOptions:

ClaudeAgentOptions(resume=session_id)                     # resume a session
ClaudeAgentOptions(continue_conversation=True)            # the most recent one
ClaudeAgentOptions(resume=session_id, fork_session=True)  # branch from a shared baseline

Each branch starts from the same baseline, neither one spoils the other, and after the fork the original refund-bug session stays unchanged.

When old results are stale, summarise and restart

Sometimes resuming is the wrong move. Look at an old session where most of the tool results are out of date: an old read of refund.py, an old read of policy.json, a long search output. Telling it "these changed" would mean correcting most of the conversation.

So you write a summary card and start a new session with it. This is the project's summary_card.md:

# Summary card for a fresh session

Findings so far
- The refund check runs before the order lookup.

Files that changed since I read them
- refund.py, policy.json

Still open
- Does the refund window live in policy.json?

Next step
- Read the two changed files again, then propose the fix.

Four headings: findings, files that changed, what is still open, and the next step. The new session reads the files again today, so every tool result in it is fresh. A clean summary is more reliable than a pile of out-of-date tool results, because there's nothing old left to trust by mistake.

The card works for the same reason a subagent brief does: the new session inherits nothing, so whatever it needs must be written down (see passing context to subagents). For why a long session degrades in the first place, and how a fresh start compares with compaction, see long-running sessions: compact, prune, isolate or start fresh.

Which one fits the situation

SituationChooseWhy
Context is mostly still trueResumeKeep the work, tell it what changed
Compare two approachesForkEach branch starts from the same baseline
Tool results are staleFresh + summaryNo old results to trust by mistake

Common mistakes

  • Resuming and saying nothing. The session doesn't notice edits on disk. It answers from Monday's file contents.
  • Expecting a fork to refresh the files. A fork copies the conversation, old tool results included. It branches; it doesn't re-read.
  • Re-exploring the whole codebase after two files changed. Name the changed files and keep the rest of the work.
  • Relying on --continue with several investigations in one folder. It takes the most recent one. Name sessions with -n and resume by name.

How this shows up in a question

A typical scenario: a developer resumes a named session the next morning, and two of the files it analysed were edited overnight. The answer that keeps the valid work is to resume and name the changed files. Watch for distractors that hope the session notices, that claim a fork refreshes tool results, or that throw everything away and start over.

Quick recap

GoalClaude Code CLIAgent SDK (Python)
Name a sessionclaude -n refund-bug
Resume a named sessionclaude --resume refund-bugresume=session_id
Continue the most recent oneclaude --continuecontinue_conversation=True
Branch from a baseline--resume refund-bug --fork-sessionresume=session_id, fork_session=True
Results are staleWrite a summary card, start a new session with it

The cheat sheet and the summary card for this lesson are in the community, free to join.

Try it yourself

Open a project of your own and start claude -n my-bug. Ask a question, quit, and bring it back with claude --resume my-bug. Then resume it again with --fork-session, try a change in the fork, and check that the original conversation didn't change.

Tried the exercise? Share your answer or ask a question.

The StudyEasy AI Community is free to join, with the lesson files, notebooks and code.

Join free on Skool

Keep going in Claude · 52 of 123

Previous
Iterative Refinement with Claude Code: Input/Output Examples, Tests First and the Interview Pattern
Next post
CI Reviews That Don't Repeat Themselves: Prior Findings, Existing Tests and Test Standards in CLAUDE.md

Related course on Udemy

Claude Certified Architect - Foundations (CCAR-F) Exam Prep

Agentic loops, tools, MCP, Claude Code, prompts, structured output and context.View on Udemy ↗: Claude Certified Architect - Foundations (CCAR-F) Exam Prep (paid course, opens in a new tab)

Related posts

CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages

Three needs in one repo: a test command, a rule that Claude must never read .env, and a shared deploy skill. See which file each belongs in, how the settings layers merge, and what a plugin manifest carries.

Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It

Pack a support team's ticket-triage routine into one skill folder, then watch three requests load one, two or all three levels: the catalog, the SKILL.md body, and a script whose code never enters the context.

One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI

Change one line in a repo and ask where it lands. A small resolver for bookshop-bot shows that a new model id in settings.json reaches only CI, a prompt bump reaches dev and CI, and a prod block edit reaches only prod.

Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges

Follow one prompt edit from a branch to a merge: version prompts and the model pin like code, keep the API key in GitHub Secrets, gate changes by path, let Claude review the diff, and leave the merge to a person.

On this page

  • A case file, a photocopy, a one-page brief
  • Name it, then resume by name
  • Tell it exactly what changed
  • Fork: two branches from one baseline
  • When old results are stale, summarise and restart
  • Which one fits the situation
  • Common mistakes
  • How this shows up in a question
  • Quick recap
  • Try it yourself
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

Claude Certified Architect - Foundations (CCAR-F) Exam Prep

Agentic loops, tools, MCP, Claude Code, prompts, structured output and context.View on Udemy ↗: Claude Certified Architect - Foundations (CCAR-F) Exam Prep (paid course, opens in a new tab)

Single logo

Empowering Education, One Course at a Time

About
About usContact us
Legal
Terms of UsePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.