TIL: Pi's /tree Is Not Claude's /resume 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. Pi's /tree Is Not Claude's /resume Today I finally understood why people keep comparing Pi’s /tree to Claude Code’s /resume . Pi’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. That sounds a lot like “go back to an old conversation,” so /resume is the first Claude command that comes to mind. The jobs are related. They are not the same. What Each Command Does | Command | What it does | |---|---| Pi /tree | Browse the current session’s history tree. Pick an earlier message. Continue from there. | Claude /resume | Open the session picker and switch to another saved conversation. | Pi /resume | Pi’s own session picker. Closest match to Claude /resume . | Claude /branch | Copy history into a new session ID. Closest match to Pi /tree ’s “try another path” feel. | The key insight: /tree navigates inside one session. /resume switches between sessions. Why That Matters Pi stores each session as a tree, not a single straight line. Each entry has an id and parentId . So one session can hold two explorations: Initial architecture discussion ├─ Redis route → implementation notes └─ Postgres route → benchmark plan You 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. Claude Code favors separate session artifacts for branches: Original session transcript └─ /branch → separate copied transcript/session You then use /resume to 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. Quick Mental Model | Need | Use | |---|---| | Try path B from an earlier turn, keep path A | Pi /tree | | Reopen yesterday’s conversation | Pi /resume or Claude /resume | | Make an experiment its own session | Claude /branch , or Pi /fork / /clone | One nuance: Pi also has /fork and /clone when you do want separate session files. /tree is the lightweight, same-file alternative. What I Learned - Pi /tree is git-like branching inside one session file - Claude /resume is session-level navigation, not an in-session timeline browser - The true Claude pair for Pi /tree is closer to /branch + /resume - For exploratory design work, /tree is 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 References Comparing coding-agent session models? Tell me which workflow clicked for you. Reach out on LinkedIn.