{"slug": "til-pi-s-tree-is-not-claude-s-resume", "title": "TIL: Pi's /tree Is Not Claude's /resume", "summary": "Pi's /tree command navigates inside a single session's history tree, while Claude Code's /resume switches between saved conversations, according to a comparison by an unnamed author. Pi stores sessions as trees with id and parentId, allowing users to branch explorations within one file, whereas Claude Code uses /branch to copy history into a new session and /resume to move between sessions. The distinction matters for developers choosing between lightweight in-session branching and separate session artifacts for independent experiments.", "body_md": "# Pi's /tree Is Not Claude's /resume\n\nToday I finally understood why people keep comparing Pi’s `/tree`\n\nto Claude Code’s `/resume`\n\n.\n\nPi’s [official post](https://x.com/pidotdev/status/2082066035042345456) says sessions are stored as trees. You can jump to any earlier point and continue from there. All branches live in one filterable file.\n\nThat sounds a lot like “go back to an old conversation,” so `/resume`\n\nis the first Claude command that comes to mind. The jobs are related. They are not the same.\n\n## What Each Command Does\n\n| Command | What it does |\n|---|---|\nPi `/tree` | Browse the current session’s history tree. Pick an earlier message. Continue from there. |\nClaude `/resume` | Open the session picker and switch to another saved conversation. |\nPi `/resume` | Pi’s own session picker. Closest match to Claude `/resume` . |\nClaude `/branch` | Copy history into a new session ID. Closest match to Pi `/tree` ’s “try another path” feel. |\n\n**The key insight:** `/tree`\n\nnavigates *inside* one session. `/resume`\n\nswitches *between* sessions.\n\n## Why That Matters\n\nPi stores each session as a tree, not a single straight line. Each entry has an `id`\n\nand `parentId`\n\n. So one session can hold two explorations:\n\n```\nInitial architecture discussion\n├─ Redis route → implementation notes\n└─ Postgres route → benchmark plan\n```\n\nYou can jump back to *“Should we use Redis or Postgres for agent memory?”*, pick that node, and continue with a different premise. The Redis path stays. You did not throw it away. You did not open a second chat file either.\n\nClaude Code favors separate session artifacts for branches:\n\n```\nOriginal session transcript\n└─ /branch → separate copied transcript/session\n```\n\nYou then use `/resume`\n\nto move between those files. Useful when an experiment should become its own unit of work. Heavier when you just want path B for five minutes.\n\n## Quick Mental Model\n\n| Need | Use |\n|---|---|\n| Try path B from an earlier turn, keep path A | Pi `/tree` |\n| Reopen yesterday’s conversation | Pi `/resume` or Claude `/resume` |\n| Make an experiment its own session | Claude `/branch` , or Pi `/fork` / `/clone` |\n\nOne nuance: Pi also has `/fork`\n\nand `/clone`\n\nwhen you *do* want separate session files. `/tree`\n\nis the lightweight, same-file alternative.\n\n## What I Learned\n\n- Pi\n`/tree`\n\nis git-like branching**inside one session file** - Claude\n`/resume`\n\nis session-level navigation, not an in-session timeline browser - The true Claude pair for Pi\n`/tree`\n\nis closer to`/branch`\n\n+`/resume`\n\n- For exploratory design work,\n`/tree`\n\nis lower friction: jump back, try path B, jump back to path A - For independent experiments you want to keep separate, Claude’s copied-session model is clearer\n\n## References\n\n*Comparing coding-agent session models? Tell me which workflow clicked for you. Reach out on LinkedIn.*", "url": "https://wpnews.pro/news/til-pi-s-tree-is-not-claude-s-resume", "canonical_source": "https://kondasamy.com/til/2026/pi-tree-vs-claude-resume/", "published_at": "2026-07-30 00:00:00+00:00", "updated_at": "2026-08-10 19:04:46.321784+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Pi", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/til-pi-s-tree-is-not-claude-s-resume", "markdown": "https://wpnews.pro/news/til-pi-s-tree-is-not-claude-s-resume.md", "text": "https://wpnews.pro/news/til-pi-s-tree-is-not-claude-s-resume.txt", "jsonld": "https://wpnews.pro/news/til-pi-s-tree-is-not-claude-s-resume.jsonld"}}