Have you ever closed PowerShell or your terminal by mistake while working in Claude Code?
I have. More than once.
On my PC, PowerShell sometimes disappears after waking from sleep for reasons I still haven't figured out. That can be frustrating when you've already spent hours discussing the project structure, reading specifications, checking files, and deciding what to change, only to come back and find the console gone.
Before I knew about Claude Code's resume feature, I often thought:
"Do I really have to open Claude Code again and explain everything from the beginning?"
Fortunately, you usually don't.
Claude Code saves your previous sessions locally, so you can reopen an earlier conversation and continue working from where you left off. The basic command is claude --resume. If you run it from the same project folder where you previously used Claude Code, you'll see a list of past sessions. Select the one you want, press Enter, and you can continue the conversation.
This article explains how to resume Claude Code after closing PowerShell, losing your terminal window, restarting your PC, or simply wanting to continue yesterday's work. I'll also explain the difference between resume and continue, what to check if your previous session does not appear, and a few related session-management features that are useful for longer projects.
How to resume Claude Code, in three lines
- The basics: run
claude --resumein the folder you were working in, then pick from the session list to continue where you left off. - If the most recent session is fine:
claude --continue(short formclaude -c) jumps straight back without showing a list. - Note: resume brings back the conversation only. It does not restore your files, so manage those separately with Git.
Table of Contents
- Closing PowerShell Does Not Usually Delete Your Claude Code Chat History
- How to Resume Claude Code from a Previous Session
claude --resumeLets You Choose from Previous Sessions- Use
claude --continueIf You Only Want the Most Recent Session - What to Do If Your Previous Claude Code Session Does Not Appear
- You Can Also Use
/resumefrom Inside Claude Code - Name Important Sessions So They Are Easier to Find Later
- Resume Restores the Conversation, Not the Old File State
- If a Lot Has Changed, Ask Claude Code to Recheck the Current Files
- The Biggest Benefit: You Do Not Have to Re-Explain the Entire Project
- If Claude Code Closes or Crashes, Try Resume First
You can pick up right where you left off with claude --resume. If you don't know about it, you end up redoing everything every time.
Closing PowerShell Does Not Usually Delete Your Claude Code Chat History
The first thing to know is that closing PowerShell or your terminal does not normally delete your Claude Code conversation history.
Claude Code saves interactive sessions locally.
That means you may still be able to continue your previous work even if:
- You accidentally closed PowerShell
- Windows Terminal was closed
- Your terminal crashed
- Your PC restarted
- Claude Code was terminated
- You came back the next day and want to continue
- Your computer went to sleep and the terminal disappeared
Before I knew about resume, I sometimes started a brand-new Claude Code session and repeated everything:
"Read this specification."
"This is the project structure."
"We already changed these files."
"Here is the approach we decided on."
That is especially annoying when Claude has already read a long specification or several files.
Using resume can save you from having to rebuild all of that context manually.
How to Resume Claude Code from a Previous Session
The process is simple.
First, open PowerShell and move to the project folder where you previously used Claude Code.
For example:
cd C:\Users\name\work\my-project
Then run:
claude --resume
Claude Code will display a list of previous sessions associated with that project.
Select the session you want to reopen and press Enter.
You can then continue the conversation from where you left off.
For example, if your previous session ended with "Next, let's fix this file," you can continue from there instead of starting a completely new conversation and explaining the project again.
claude --resume Lets You Choose from Previous Sessions
When you run:
claude --resume
Claude Code opens a session picker that lets you browse previous conversations.
This is useful when you have worked on the same project several times and are not sure which session you want to continue.
You can move through the list with the arrow keys and select a session with Enter.
Claude Code also lets you preview sessions, which is helpful when several of them look similar.
If you are wondering "Where did my previous Claude Code chat go?" or "Can I continue an old Claude Code session?", checking claude --resume should be one of the first things you try.
Use claude --continue If You Only Want the Most Recent Session
Sometimes you do not need to choose from a list.
If you simply closed PowerShell a few minutes ago and want to continue the most recent Claude Code session in the current project, you can use:
claude --continue
You can also use the shorter version:
claude -c
The difference is simple:
| What you want to do | Command |
|---|---|
| Continue the most recent session | claude --continue |
| Continue the most recent session with a shorter command | claude -c |
| Choose from previous sessions | claude --resume |
I tend to use claude --resume because I often want to check which session I'm reopening, but --continue is faster when you know you only need the latest one.
What to Do If Your Previous Claude Code Session Does Not Appear
If you run claude --resume and cannot find the session you are looking for, check your current directory first.
Claude Code sessions are associated with projects.
For example, if you previously worked in:
C:\Users\name\work\website-a
but today you run claude --resume from:
C:\Users\name
your expected session may be harder to find.
In that case, move back to the same project directory:
cd C:\Users\name\work\website-a
Then run:
claude --resume
again.
In my own use, I normally go back to the same folder where I originally launched Claude Code before trying to resume a session.
You Can Also Use /resume from Inside Claude Code
If Claude Code is already open, you can use:
/resume
inside Claude Code.
This is useful when you have already started a new session but then realize "I actually want to continue yesterday's chat."
You do not need to exit Claude Code and restart it with:
claude --resume
Instead, you can switch sessions from inside Claude Code with /resume.
Name Important Sessions So They Are Easier to Find Later
If you use Claude Code across several projects, your session history can become difficult to manage.
You may eventually run into this problem: "Which one of these sessions was for that project?"
For longer-running work, it can be useful to give a session a name.
Inside Claude Code, you can use:
/rename my-project
You can also start Claude Code with a name:
claude --name my-project
or:
claude -n my-project
Once a session has a name, you can resume it directly with:
claude --resume my-project
If you work on multiple websites, applications, or client projects at the same time, naming sessions can make them much easier to manage.
Resume Restores the Conversation, Not the Old File State
There is one important thing to understand.
claude --resume resumes your previous Claude Code session, but it does not roll your files back to an earlier version.
For example, suppose Claude Code edited index.html yesterday, and then you manually changed the same file later.
If you resume yesterday's session today, index.html will not automatically return to yesterday's version.
The resume feature is for continuing the Claude Code conversation.
It is not a file version-control system.
If you need to restore older versions of files, use Git or another version-control method.
If a Lot Has Changed, Ask Claude Code to Recheck the Current Files
Resuming a previous session is convenient, but I am more careful when reopening a session that has been inactive for a long time.
For example, the project may have changed because:
- You edited files manually
- Another AI modified the code
- You pulled new changes from Git
- The directory structure changed
- The project requirements changed
In those cases, the information from the old session may no longer match the current state of the project.
A simple instruction like this can help:
Some files may have changed since the previous session. Please check the current project state before continuing.
If I am resuming a session only a few minutes after accidentally closing PowerShell, I usually continue immediately. But if several days or weeks have passed, asking Claude Code to verify the current files first is a good idea.
The Biggest Benefit: You Do Not Have to Re-Explain the Entire Project
For me, this is the biggest reason to use Claude Code's resume feature.
When using Claude Code for real development work, you are rarely just asking it to write one small piece of code.
You may have already:
- Asked it to read a specification
- Had it inspect the project structure
- Discussed the cause of a bug
- Agreed on a fix
- Told it which files must not be changed
- Revised the implementation plan several times
If PowerShell closes at that point, starting again from zero can be painful.
You may not even remember every small decision you made with Claude during the previous session.
By resuming the old session, you can continue with the previous conversation and work history instead of reconstructing everything manually.
Once I learned about this feature, recovering from an accidentally closed PowerShell window became much easier.
So the move is: don't panic and start a new chat when it closes, check resume first.
If Claude Code Closes or Crashes, Try Resume First
If you accidentally close PowerShell, restart your PC, or lose your Claude Code terminal window, do not immediately start over and explain the whole project again.
First, go back to the project directory:
cd C:\path\to\your\project
Then try:
claude --resume
If you only need the most recent session, use:
claude --continue
or:
claude -c
I have lost my PowerShell window several times while using Claude Code, and before learning about resume I often assumed I would need to explain everything again.
Now I simply reopen the previous session and continue from where I left off.
If you use Claude Code for longer development tasks, this is one of those small features that is worth knowing.


