Urgent.News

What's breaking now, across thousands of outlets.

AI

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

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,…

Claude Code is a tool used by the writer throughout the day, often creating multiple sessions in various terminal windows, tabs, tmux panes, and screens. The writer faced two main issues: forgetting which session they had open and whether they had discussed a particular topic with Claude in another project. To address these issues, the writer created a shell helper called ccctl, which has since evolved into a single Go binary.

ccctl ps lists all running Claude Code sessions with their title and state. ccctl focus brings the targeted session to the forefront, whether it's an iTerm2 tab, Terminal.app window, or tmux pane. Tab completion uses the session titles, so there's no need to remember session IDs. ccctl find searches through all conversations in every project, and a search takes about a second, even with a 1.5 GB history from eight months of work.

ccctl ui provides a single screen overview of projects, sessions, and running sessions, similar to k9s. The writer can resume a session or jump to it while it's running. Renaming a project directory used to risk losing associated Claude Code history, but ccctl move addresses this issue by renaming the directory and preserving sessions, memory, settings, and prompt history. The --dry-run option shows the plan before implementation and refuses to proceed if Claude Code is still running in the directory.

The creator clarifies that ccctl is unofficial and not affiliated with Anthropic, as it reads files written by Claude Code in the ~/.claude/ directory, which are not officially documented. Updates to Claude Code could potentially break ccctl, requiring fixes. The tool is tested with Claude Code 2.1.316 on macOS and Linux, with no Windows support.

The creator writes code using Claude Code, but also contributed to ccctl's development. It can be installed using brew or go install, and the code, documentation, and releases are available on GitHub under the MIT license. The creator welcomes issues and ideas, as they use ccctl daily and aims to improve it.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in AI

Thailand eyes status as AI medical hub

Thailand wants to become a regional artificial intelligence (AI) medical hub by developing AI models tailored to Southeast Asian populations and turning decades of clinical research into advances in…

More from Sunday 1 November →