cd /news/ai-tools/i-kept-losing-my-claude-code-session… · home › topics › ai-tools › article
[ARTICLE · art-162174] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

I kept losing my Claude Code sessions, so I wrote ccctl

A developer built ccctl, an open-source Go command-line tool for managing Claude Code sessions across projects, terminals and tmux panes. It lists running sessions, focuses them in iTerm2, Terminal.app or tmux, searches conversation history (about 1.5 GB searched in roughly a second without an index), provides a k9s-style UI, and moves project directories while preserving sessions, memory, settings and prompt history. The tool is unofficial, reads undocumented files under ~/.claude/, is tested with Claude Code 2.1.316 on macOS and Linux, and is MIT licensed.

by read2 min views1 publishedNov 1, 2026

I use Claude Code all day, which means a lot of sessions: one per project, sometimes three, spread over terminal windows, tabs, tmux panes and multiple screens. Two questions kept coming back. Where is that session I had? And didn't I already talk this through with Claude, a few weeks ago, in some other project?

So I started writing small shell helpers. They grew, they got slow on big sessions, and now they are a single Go binary: ccctl, Claude Code control.

ccctl ps lists every running Claude Code session with its title and state. ccctl focus brings one to the front - the iTerm2 tab, the Terminal.app window or the tmux pane. Tab completion knows the running sessions by title, so I never type a session ID.

ccctl find searches every conversation in every project. My own history is 1.5 GB from eight months of work, and a search takes about a second. No index yet - that comes next.

ccctl ui shows projects, sessions and the running ones on one screen. Enter resumes a session, or jumps to it while it runs. I really like k9s, so it works the same way, with :views, j/ k and Enter.

Renaming a project directory used to cost me its Claude Code history. ccctl move <dir> <new-path> renames the directory and takes its sessions, memory, settings and prompt history along. --dry-run shows the plan first, and it refuses while Claude Code still runs in there.

ccctl is unofficial and not affiliated with Anthropic. It reads the files Claude Code writes under ~/.claude/, and those are not documented. A Claude Code update can change them, and then ccctl needs a fix. I test it with Claude Code 2.1.316 on macOS and Linux. No Windows.

Of course this was written with Claude Code, but I helped a little bit.

brew install crux/tap/ccctl
go install github.com/crux/ccctl/cmd/ccctl@latest

Code, docs and releases: github.com/crux/ccctl. MIT licensed. Issues and ideas welcome - I use it every day, so I will see them.

── more in #ai-tools 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-kept-losing-my-cla…] indexed:0 read:2min 2026-11-01 · —