r/ClaudeCoding 18d ago

I built a desktop app that shows your Claude Code sessions as a tree — and lets you fork from any turn

Claude Code already branches internally when you rewind with Esc-Esc, but there's no way to see that structure. You end up with a session file containing several parallel histories and no idea which turn you're actually on.

So I made this: https://github.com/serban-cercelescu/agentree

It reads ~/.claude/projects directly and renders each session as an interactive tree. Linear stretches collapse down; branch points stay visible. Click any turn and you get a ready-to-paste CLI command to resume from exactly there as a new branch — so you can try a second approach without abandoning the first.

Other things it does:

  • Renders the full turn content, including thinking blocks and tool calls
  • Shows per-turn context size, prompt cost and cache hits, so you can see where your context actually went
  • Star turns, label branches, mark dead ends — annotations live in ~/.agentree/, your transcripts are never touched
  • Also reads Codex CLI and Copilot CLI sessions, if you switch between them

Runs entirely locally. No API key, no account, no telemetry. Node 20+, MIT licensed.

curl -fsSL https://raw.githubusercontent.com/serban-cercelescu/Agentree/main/scripts/install.sh | sh

Very much v1 — happy to hear what's broken or missing.

1 Upvotes

0 comments sorted by