Skip to main content
  1. Posts/

Stop Losing Your Claude Code Conversations

··623 words·3 mins·
Nick Liu
Author
Nick Liu
Building infrastructure for Facebook Feed Ranking at Meta. Previously at Walmart, Twitter, AWS, and eBay. MS in Computer Science at Georgia Tech.
Table of Contents
Taming Claude Code Sessions - This article is part of a series.
Part 1: This Article
You're deep in a great Claude Code conversation. You close the terminal. The next day you want to pick up where you left off… and you can't find it. Sound familiar? Let's fix that.
Tested with Claude Code 2.1.x · macOS / Linux

What is a “session,” and where does it go?
#

Every time you run claude, you start a session, one conversation, with its full history. When you quit, that history doesn’t vanish. Claude Code saves it to disk, organized per project folder, here:

~/.claude/projects/<your-project>/<session-id>.jsonl

Each .jsonl file is one session. So your conversations are all still there. The problem is finding the right one later.

The built-in way to get back: /resume and --continue
#

Claude Code already ships two ways to return to a past session.

Continue the most recent one (in the current folder):

claude --continue      # or the short form: claude -c

Pick from a list: run this and you get an interactive picker:

claude --resume        # or: claude -r

Or, from inside a running session, type the slash command:

/resume

The picker shows your past sessions with a summary, how long ago you used them, and (if you named them, more on that soon) a title. Use the arrow keys, press Enter to resume, Esc to cancel.

The shortcut nobody tells you about: Ctrl+A
#

Here’s the catch that trips up most people: by default, the picker only shows sessions from the folder you’re currently in. So if you’re in the wrong directory, your session looks “lost” when it’s really just filtered out.

The fix: open the picker and press Ctrl+A. That widens it to every project on your machine. Suddenly everything is there.

A few more handy keys inside the picker (they’re shown along the bottom, so you don’t have to memorize them):

Key What it does
(type anything) Fuzzy-search the list
Ctrl+A Show sessions from all projects
Ctrl+B Filter to your current git branch
Ctrl+R Rename the highlighted session
Enter / Esc Resume / cancel
Running inside tmux? Ctrl+B is also the default tmux prefix, so tmux may swallow it before the picker sees it. Either trigger your branch filter another way or remap your tmux prefix (mine is Ctrl+A). We get into tmux properly in Part 3.

Tip: you can also paste a GitHub pull-request URL into the search to find the session that created it.

Resume by name (once your sessions have names)
#

If a session has a name, you can jump straight to it:

claude --resume "my-feature"     # exact match resumes immediately
claude -r my-feature             # partial: opens the picker pre-filtered

The real fix: give your sessions names
#

Searching only works if there’s something readable to search for. Out of the box, sessions are unnamed, so the picker falls back to auto-summaries that all look kind of the same.

Three ways to name a session:

  • At launch: claude --name "auth-refactor"
  • While running: type /rename auth-refactor
  • Automatically: when you accept a plan in plan mode, Claude names the session from the plan.

Naming the keepers turns /resume from “scroll and squint” into “type three letters and hit Enter.”

Your new cheat sheet
#

claude -c                 # resume the most recent session here
claude -r                 # open the picker  → press Ctrl+A for ALL projects
claude -r my-feature      # jump to a session by name
/rename my-feature        # name the session you're in (do this for keepers!)

That’s 90% of the battle. But typing /rename every time is a chore, and you’ll forget. In Part 2 we’ll write a tiny hook that names every session automatically, so the picker is always searchable without you lifting a finger.

Taming Claude Code Sessions - This article is part of a series.
Part 1: This Article

Related

Make tmux Show What Each Window Is Doing

··779 words·4 mins
If you use tmux, you've hit this: ten windows open and they're all named `zsh` or `node`. Which one had your AI agent running? No idea. Let's make tmux label windows usefully. Taming Claude Code Sessions · Part 3 of 4 1 2 3 4 🧪 Tested with Claude Code 2.1.x · macOS / Linux New to tmux? It’s a “terminal multiplexer”: it splits one terminal into many windows and panes that survive disconnects. The only vocabulary you need here: a window is like a browser tab inside tmux; the bar at the bottom lists them. The prefix is the key you press before a tmux command, commonly Ctrl+b (mine is Ctrl+a). Why everything is named zsh # By default tmux has a setting called automatic-rename turned on. It renames each window after whatever program is running in it. A shell? zsh. A Node program (like Claude Code)? node. Helpful in theory, useless when everything collapses to the same word.

Running Several AI Coding Agents Without Losing Track

··875 words·5 mins
Once you're comfortable with AI coding agents, you start running several at once: one refactoring here, one writing tests there, one stuck waiting for your approval. Keeping them straight is its own little skill. Taming Claude Code Sessions · Part 4 of 4 1 2 3 4 🧪 Tested with Claude Code 2.1.x · macOS / Linux Here are two ways to do it: a lightweight tmux plugin, and (briefly) dedicated “AI terminal” apps.

Your First Claude Code Hook: Auto-Name Every Session

··886 words·5 mins
In Part 1 we learned that named sessions are easy to find. Now let's make naming automatic with a hook. This is also a perfect first hook project, so I'll explain the whole idea from scratch. Taming Claude Code Sessions · Part 2 of 4 1 2 3 4 🧪 Tested with Claude Code 2.1.x · macOS / Linux Part 1 left us with one chore: you still have to remember to name your sessions. Let’s delete that chore.