Course · Claude Code · Sessions & context
Resume a session with --continue and --resume
Yesterday’s health-check task had a small but important constraint: add /healthz and keep /health. The task lives in the course’s running example, a small Express + TypeScript payments service: routes begin in src/index.ts, payment code sits under src/payments/, and npm test runs the Vitest suite in tests/. Today, you can reconstruct the constraint from the patch if it is still there. The harder part is remembering whether the tests passed, which failures were already present, and whether the app extraction (moving app construction out of src/index.ts so tests can import it) was accepted or merely proposed.
The commands below run in your terminal, from the repository where the earlier session took place, with Claude Code installed and signed in (the install lesson covers that setup). Any earlier task in your own repository works in place of the health patch. If you have no saved session at all, skip to the missing-conversation recovery below.
From the same project directory, choose the conversation you want to recover:
claude --continue --permission-mode defaultThat resumes the most recent conversation for the directory. If you did other work afterward, use the picker instead:
claude --resume --permission-mode defaultInside a running session, /resume also opens the picker. These entry points are documented in resuming previous conversations. The explicit permission flag sets the permission mode, which governs whether the agent’s file edits and commands wait for your approval; default keeps each action behind a prompt unless a saved permission rule or organization setting already allows it, whereas a plain claude launch on current Pro, Max, and Team plans starts in auto mode and approves most actions on its own (Enterprise may differ; the permission-modes reference lists the modes and current defaults). Resumption itself is not a reason to assume a particular permission posture.
Recover the decision, then check the files
Section titled “Recover the decision, then check the files”Ask the resumed session:
Summarize where we left the health-check change. Distinguish decisions,proposed edits, edits actually made, and checks actually run.Then inspect the current files and Git status. Tell me where the savedconversation disagrees with the working tree. Do not edit anything.Keep your own terminal beside it:
git status --shortgit diffgit diff --cachedOpen any untracked files separately. The conversation might say it created tests/health.test.ts; Git status and the file itself tell you whether it is there now. If the agent mentions src/app.ts, check whether you actually accepted that extraction. A proposal in a message and a file on disk are different evidence: the saved conversation is context, and its freshness is not guaranteed, so the working tree is the authoritative source.
Suppose you removed the /healthz patch after yesterday’s session. The transcript can still accurately describe yesterday’s work while giving you the wrong picture of today’s code. Correct the session’s working assumptions before asking it to continue. Repeating the old conclusion more confidently will not restore the missing route.
If the conversation is missing
Section titled “If the conversation is missing”Check the directory first. If --continue finds nothing, try the picker from the project where you did the work. Claude Code stores sessions locally and the picker can search more broadly; the session guide explains its scope. A new machine or an unavailable transcript may leave you with no session to recover.
In that case, give the new session the current code, actual test results, and whatever notes you saved. Ask it to identify unknowns. Do not ask it to “remember” a discussion it cannot access. You can recover a useful task description without inventing a history.
For the health task, the minimum is concrete: both addresses must work, payment behavior is outside scope, and full-suite failures must be compared with a recorded baseline. If the baseline was never saved, say so and run a new check. Do not label today’s failures pre-existing merely because the agent thinks they look familiar.
Decide whether this is still the same task
Section titled “Decide whether this is still the same task”A resumed conversation earns its cost when its decisions help the work in front of you. It also brings history the next task may not need. The health session has useful details about app startup and HTTP tests; those details are less useful for tracing duplicate payment keys.
Before switching, write down the current health-task status in your own notes: actual files, checks run, unresolved failures, and the next action. Then start the separate investigation without carrying the whole health discussion into it.