Enqurious logo
TM
Request a Demo
Back to blog
Guides & Tutorials

Where Did My Claude Code Session Go? How to Find Any Lost Session

Where Did My Claude Code Session Go? How to Find Any Lost Session blog cover image
AI
Mansi Mutreja

If you've ever spent hours deep in a Claude Code session — building something complex, iterating back and forth — and then opened your terminal the next day only to find /resume showing you something completely different, you know that sinking feeling.

I lost the same type of chat three times before I figured out what was actually going on. This post is everything I wish someone had told me on day one.


The Problem: /resume Isn't Showing Your Recent Sessions

Here's the scenario. You run Claude-personal (or whatever alias you use), do a ton of work, close the terminal. Next day you come back, type /resume, and either:

â—Ź       The session you want isn't there at all

â—Ź       It shows you an older session from weeks ago

â—Ź       It just shows a blank list

You start panicking. Did I lose everything? Where did it go?

The short answer: your session is almost certainly not lost. It's just stored somewhere your current Claude instance isn't looking.


What's Actually Happening Under the Hood

Claude Code stores all session data as .jsonl files on your local machine. Every conversation, every file read, every tool call — it's all saved. The /resume command reads from a sessions-index.json file to know which sessions to display.

Here's where it gets tricky.

If you're using a custom Claude profile — like an alias that sets CLAUDE_CONFIG_DIR — your sessions are stored in a completely separate directory from the default ~/.claude/ folder.

In my case, I had this alias set up:

claude-personal: aliased to CLAUDE_CONFIG_DIR=~/.claude-admin-account command claude

This meant every session I ran with claude-personal was being saved to ~/.claude-admin-account/projects/ — not ~/.claude/projects/. So when I ran /resume in a regular claude session, it was looking in the wrong place entirely.

The second issue: even within the correct directory, Claude Code uses a sessions-index.json file to populate the /resume list. If that index file is outdated or stopped being updated (which can happen when auto-updates fail — you'll see that warning at the bottom of your terminal), newer sessions just don't appear in the list even though they exist on disk.


How to Find Your Missing Session

Step 1: Figure out which directory your profile uses

which claude-personal

If the output shows something like aliased to CLAUDE_CONFIG_DIR=~/.claude-admin-account command claude, that's your config directory.

Step 2: List the projects folder for that config

ls -lt ~/.claude-admin-account/projects/

Or for the default profile:

ls -lt ~/.claude/projects/

This shows all your project folders, named after the directory paths you worked in.

Step 3: Find your project folder and list sessions by date

ls -lt ~/.claude-admin-account/projects/-Users-yourname-Documents-YourProject/

You'll see .jsonl files sorted by modification time. The largest, most recent one is almost certainly your missing session.

Step 4: Resume directly by session ID

claude-personal --resume <session-id-without-the-.jsonl>

That's it. No index file needed when you pass the ID directly.


Setting Up an Alias to Never Hunt Again

Once I understood the pattern, I added this to my ~/.zshrc:

alias claude-sessions="ls -lt ~/.claude-admin-account/projects/-Users-yourname-Documents-YourProject/ | head -10"

Now I just type claude-sessions in any terminal and instantly see my 10 most recent sessions sorted by date. Takes two seconds to find what I need.

To make the alias permanent (so it survives closing the terminal):

echo 'alias claude-sessions="ls -lt ~/.claude-admin-account/projects/YOUR-PROJECT-PATH/ | head -10"' >> ~/.zshrc

source ~/.zshrc


Why Does the Sessions Index Break?

The sessions-index.json file gets created once and is supposed to update as you create new sessions. But if Claude Code fails to auto-update (you'll see the warning: "Auto-update failed · Try claude doctor or npm i -g @anthropic-ai/claude-code"), this index can stop being written to.

Your sessions are still being saved as .jsonl files — that part works fine. But the index that /resume reads from just stops getting new entries.

The fix: run claude doctor to diagnose update issues, and keep Claude Code updated. But even if the index is broken, the direct --resume <id> approach always works because it bypasses the index entirely.


The Workflow I Use Now

At the end of every meaningful Claude Code session, I do two things:

  1. Note the most recent session ID by running: ls -lt ~/.claude-admin-account/projects/MY-PROJECT/ | head -3

  2. Keep a simple note (even a sticky note) with the last session ID

Takes 10 seconds and has saved me enormous frustration.


Key Takeaways

â—Ź       Sessions are almost never actually lost — they're just stored somewhere you're not looking

â—Ź       Custom profile aliases (CLAUDE_CONFIG_DIR) create separate storage directories that the default /resume won't show

â—Ź       The sessions index can go stale — bypass it with --resume <session-id> directly

â—Ź       ls -lt on the projects folder is your best friend for finding recent sessions

â—Ź       Run claude doctor if you see auto-update warnings — they're a sign something deeper may be misconfigured


One More Thing

If you ever need to figure out what a session contained without opening it, you can peek at the first few lines:

head -c 500 ~/.claude-admin-account/projects/YOUR-PROJECT/YOUR-SESSION-ID.jsonl

This shows you the first user message, so you can identify which session is which without resuming all of them.

Hope this saves someone the three hours it took me to figure all this out.


Have you run into other Claude Code quirks that took you a while to figure out? Drop them in the comments — I'm building a running list of things that aren't obvious from the docs.

Ready to Experience the Future of Data?

Discover how Enqurious helps deliver an end-to-end learning experience
Curious how we're reshaping the future of data? Watch our story unfold
Get Free Snowpro Core Certification Skill Path

You Might Also Like

What Happens When Claude Meets Databricks? blog cover image
Guides & Tutorials
June 5, 2026
What Happens When Claude Meets Databricks?

How a data engineering team replaced manual pipeline work with natural language prompts, using Claude Code and the Databricks AI Dev Kit.

Sayli Sr. Data Engineer
6 Errors I Hit Connecting Databricks Apps to Genie AI blog cover image
Guides & Tutorials
June 3, 2026
6 Errors I Hit Connecting Databricks Apps to Genie AI

Six errors, 6 hours of debugging, and the permission checklist that finally made Databricks Apps + Genie work. The full lessons-learned guide.

Mansi AI & ML Engineer
What is Scenario Based Learning for Data Teams? blog cover image
Guides & Tutorials
May 15, 2026
What is Scenario Based Learning for Data Teams?

Scenario based learning replaces tutorials with realistic operational scenarios where engineers develop the hands on judgment classroom instruction cannot produce. How it works and why it matters.

Mandar Sr. Data Analyst
Data Engineering Roadmap 2026: What Companies Actually Hire blog cover image
Guides & Tutorials
May 5, 2026
Data Engineering Roadmap 2026: What Companies Actually Hire

The 2026 data engineering roadmap. SQL, Python, cloud, Airflow, dbt, streaming. What companies actually hire for and how to build a portfolio that gets shortlisted.

Mandar Sr. Data Analyst
Medallion Architecture: Why Most Data Pipelines Break Without It blog cover image
Guides & Tutorials
April 30, 2026
Medallion Architecture: Why Most Data Pipelines Break Without It

Medallion Architecture splits your data pipeline into Bronze, Silver, and Gold layers so a small business change never forces a full rebuild. Here's why it works.

Divyanshi Data Engineer
An Advanced Git Tutorial: Lessons from a Real-World Versioning Crisis blog cover image
Guides & Tutorials
March 7, 2026
An Advanced Git Tutorial: Lessons from a Real-World Versioning Crisis

I was working on a large content repository on Windows, and I needed to version some new work — campaign assets, workshop content, LinkedIn job descriptions, and some file deletions. Simple enough, right? What followed was a two-day journey through some of Git's more obscure corners.

Amit Co-founder & CEO
Data Quality Explained: Challenges, Best Practices, and Complete 2026 Guide blog cover image
Guides & Tutorials
January 23, 2026
Data Quality Explained: Challenges, Best Practices, and Complete 2026 Guide

A complete beginner’s guide to data quality, covering key challenges, real-world examples, and best practices for building trustworthy data.

Divyanshi Data Engineer
Data Lakehouse Demystified: Unlocking Databricks’ Hidden Powers in 2025 blog cover image
Guides & Tutorials
December 29, 2025
Data Lakehouse Demystified: Unlocking Databricks’ Hidden Powers in 2025

Explore the power of Databricks Lakehouse, Delta tables, and modern data engineering practices to build reliable, scalable, and high-quality data pipelines."

Divyanshi Data Engineer
Data Doesn’t Wait Anymore: A Guide to Streaming with Azure Databricks blog cover image
Guides & Tutorials
December 15, 2025
Data Doesn’t Wait Anymore: A Guide to Streaming with Azure Databricks

Data doesn’t wait - and neither should your insights. This blog breaks down streaming vs batch processing and shows, step by step, how to process real-time data using Azure Databricks.

Divyanshi Data Engineer
Unity Catalog Just Leveled Up: Meet your Data’s New Bodyguards blog cover image
Guides & Tutorials
December 8, 2025
Unity Catalog Just Leveled Up: Meet your Data’s New Bodyguards

This blog talks about Databricks’ Unity Catalog upgrades -like Governed Tags, Automated Data Classification, and ABAC which make data governance smarter, faster, and more automated.

Divyanshi Data Engineer
"Yeh Dosti" of AI: Claude & Nano Banana as Jai & Veeru! blog cover image
Guides & Tutorials
December 6, 2025
"Yeh Dosti" of AI: Claude & Nano Banana as Jai & Veeru!

Tired of boring images? Meet the 'Jai & Veeru' of AI! See how combining Claude and Nano Banana Pro creates mind-blowing results for comics, diagrams, and more.

Burhanuddin DevOps Engineer
The Day I Discovered Databricks Connect  blog cover image
Guides & Tutorials
December 1, 2025
The Day I Discovered Databricks Connect

This blog walks you through how Databricks Connect completely transforms PySpark development workflow by letting us run Databricks-backed Spark code directly from your local IDE. From setup to debugging to best practices this Blog covers it all.

Divyanshi Data Engineer
Building Bronze Layer: Using COPY INTO in Databricks blog cover image
Guides & Tutorials
September 12, 2025
Building Bronze Layer: Using COPY INTO in Databricks

Master the bronze layer foundation of medallion architecture with COPY INTO - the command that handles incremental ingestion and schema evolution automatically. No more duplicate data, no more broken pipelines when new columns arrive. Your complete guide to production-ready raw data ingestion

Sayli Sr. Data Engineer
Understanding the Power Law Distribution blog cover image
Guides & Tutorials
January 3, 2025
Understanding the Power Law Distribution

This blog talks about the Power Law statistical distribution and how it explains content virality

Amit Co-founder & CEO
An L&D Strategy to achieve 100% Certification clearance blog cover image
Guides & Tutorials
December 6, 2023
An L&D Strategy to achieve 100% Certification clearance

An account of experience gained by Enqurious team as a result of guiding our key clients in achieving a 100% success rate at certifications

Amit Co-founder & CEO