Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Session Tree for Claude CodeNew to Visual Studio Code? Get it now.
Session Tree for Claude Code

Session Tree for Claude Code

maciekv

|
1 install
| (0) | Free
Organize Claude Code sessions in folders, tag them with labels and see live status: working, waiting for you, done. Unofficial.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Session Tree for Claude Code

Keep many Claude Code sessions under control in VS Code: folders, labels, and the live status of every session and its sub-agents.

Session Tree in VS Code: sessions in coloured folders with labels, live status icons, sub-agents under a working session and counters in the status bar

  • Folders — nested, drag & drop, in colour. A collapsed folder shows the most urgent state inside it.
  • Live status — working, waiting for you, finished, no signal.
  • Sub-agents under their session — what each one is doing now, and for how long.
  • Labels — board columns (To do … Done) or your own, shown as the colour of the name.
  • Next session waiting for you — ⌥⌘J (Ctrl+Alt+J) or a click on the status bar counter.
  • Where it stopped — hover a session: your last prompt, the beginning of Claude's reply, the git branch.
  • One click opens the session's tab.

The tooltip of a session: its status, git branch, label and sub-agents, your last prompt and the beginning of Claude's reply

macOS, Linux and Windows. On Windows, live status needs Git for Windows — Claude Code runs hooks in its Git Bash.

Unofficial. Not affiliated with or endorsed by Anthropic. "Claude" is a trademark of Anthropic.

Install

In VS Code: Extensions → search for Session Tree for Claude Code, or

code --install-extension maciekv.session-tree-for-claude-code

It is on the Visual Studio Marketplace and on Open VSX, for editors that install from there.

Coming from the .vsix (0.6.x, local-dev.…)? Update it to 0.6.4 first and open each of your projects once: the Marketplace version takes over the folders and labels from it, then offers to uninstall the old copy.

Every release is also on GitHub as a .vsix, built by GitHub Actions from its tag, with signed build provenance:

gh attestation verify session-tree-for-claude-code-<version>.vsix --repo maciekv/claude-session-tree

In detail

  • Folders — like files: nested folders, drag & drop, rename, delete. + and the folder button on a folder add a session or a sub-folder inside it. Folder Colour… (right click) gives a folder one of the eight label colours: its icon is filled with it and its name shown in it (VS Code does not let extensions colour the row background); themes can change them with sessionTree.color.* in workbench.colorCustomizations. A collapsed folder shows, instead of the folder icon, the most urgent state of its sessions — waiting for you, then finished, then working (blinking), then no signal — and remembers that it is collapsed.
  • Live status — the same conversation icon in every state:
    • both bubbles blink — working
    • orange bubble with "?" — waiting for you (permission, question, plan approval)
    • green bubble with a check — finished, not seen yet (clears when you open the tab)
    • dashed amber outline — no signal for a while (Claude Code may have stopped)
  • Sub-agents — when Claude starts agents (the Agent tool, workflows), the session opens up and shows them: what each one is for, its kind or workflow phase, what it is doing now ("Bash: Run the tests", "Edit tree.ts") and for how long. They have their own icon — one bubble with "typing" dots instead of the two bubbles of a session; one that needs your permission shows "?", finished ones get a grey check and fold away after a few minutes. Workflow and background agents stay listed until they really end, also after the session's turn is over. The session waits for you when one of its agents does, and works while one of them works. Turn off with sessionTree.showSubagents.
  • Labels — shown next to the session and as the colour of its name. Only the stages where something is happening are coloured: To do keeps the normal text colour, Done is dimmed, and orange / green are left to the live status. Every label can be renamed, recoloured or deleted (Manage Labels…); a new label asks for its colour.
  • Next session waiting for you — questions and permission requests first, then finished sessions, longest waiting first. Press again for the next one.
  • Counters in the status bar and a badge on the activity bar icon when something needs you.

How it works

  • Sessions are read from Claude Code's own transcripts (~/.claude/projects/…), only for the folder opened in the current window. Read: the title, the time of the last message, the git branch, your last prompt and the first ~280 characters of Claude's last reply (for the tooltip — turn off with sessionTree.showConversationInTooltip), and — to know when a sub-agent ends — the ids of agents moved to the background and Claude Code's notices that a background task ended (id and status only). Only the beginning and the end of each file are read.
  • Live status comes from Claude Code hooks. On first start the extension offers to add them to ~/.claude/settings.json (on Windows, %USERPROFILE%\.claude\settings.json):
    • a backup of settings.json is saved next to it (settings.json.session-tree-<time>-<id>.bak),
    • your existing hooks are kept,
    • each hook is one shell command that writes the latest event of a session to ~/.claude/session-tree/state/<session id>.json (first 8 KB, overwritten every time), prints nothing and always exits 0 — and is set to let Claude go on if it ever cannot run. Events of a sub-agent go to <session id>.agents/<agent id>.json instead, and never change the session's file; when a sub-agent ends, the hook removes such files older than a day, also when VS Code is not running (an agent asking for permission also leaves an empty <agent id>.ask file, so Claude Code's notification about it, which comes without the agent's id, does not replace the session's own event). All of them are readable only by you, like Claude Code's own transcripts.
  • Sub-agents: their description and kind come from Claude Code's subagents/*.meta.json next to the transcript. For what an agent is doing, the tree shows only the name of the file it works on and, for a shell command, the one-line description that comes with it (up to 48 characters), or just its program when there is none. It never shows the command line. The Grep and WebSearch tools show only their name, WebFetch only the host name of the page, Glob only the last part of its pattern, and MCP tools their server and tool name. A shell command's description and an agent's own description are free text that Claude writes: they can name what is searched for, a file or a folder, and recent Claude Code versions search with shell commands (grep, rg, find) rather than the Grep tool. On a shared screen, set sessionTree.showSubagents to false: no agent rows, no agent descriptions and nothing about what agents are doing; sessions keep their title and status. Also set sessionTree.showConversationInTooltip to false to hide your last prompt and Claude's reply.
  • On Windows, Claude Code runs hooks in Git Bash (from Git for Windows): the extension finds it the way Claude Code does — CLAUDE_CODE_GIT_BASH_PATH, then C:\Program Files\Git, then the git on PATH — and installs the hooks only when it is there. Without it, Claude Code runs hooks in PowerShell, where they cannot run.
  • Folders (with their colour and collapsed state), labels and "seen" state are stored in VS Code's workspace storage.
  • Nothing leaves your computer. No telemetry.

Remove the hooks any time: … → Remove Claude Code Hooks in the view.

Commands

Where Action
View title 🔔 Next session waiting for you (only when something waits), New Claude Session, New Folder, Refresh, … → Settings, Check Setup, Install / Remove hooks
Keyboard ⌥⌘J / Ctrl+Alt+J — Go to Next Session Waiting for You
Status bar counter Click → next session waiting for you; tooltip lists them
Folder (right click) New Claude Session here, New Folder, Rename, Move to Folder…, Delete Folder
Session (right click) Open, Set Label…, Move to Folder…, Copy Session ID
Drag & drop Sessions and folders onto a folder or the empty area (top level)

"New Claude Session" on a folder puts the next new session into that folder.

Settings

  • sessionTree.recentDays (7) — sessions without a folder, inactive longer than this, go under Older.
  • sessionTree.staleMinutes (15) — a working session with no signal for this long is shown as "no signal".
  • sessionTree.idleIcon (conversation) — icon of idle sessions: conversation (bright when open in a tab, dimmed when only history), dot or none.
  • sessionTree.showConversationInTooltip (true) — last prompt and reply in the tooltip; turn off if you share your screen.
  • sessionTree.showSubagents (true) — sub-agents under their session.
  • sessionTree.animateWorkingTitle (false) — the title of a working session blinks in changing colours.
  • sessionTree.showStatusBar (true)

Nothing blinks when VS Code's workbench.reduceMotion is on.

Troubleshooting

Run Session Tree: Check Setup (Command Palette, or … in the view). It opens a report and says what to fix:

  • Claude Code installed and active, or off because the folder is in Restricted Mode,
  • the hooks: installed, the current version (or a newer one from another editor or profile), actually running on this machine (on Windows: in which Git Bash), the last event,
  • a settings.json that is read-only or a link to a missing file (left as it is),
  • settings that switch hooks off (disableAllHooks, managed allowManagedHooksOnly),
  • whether Claude Code writes to sessions while no hook event arrives,
  • where the transcripts of this folder are and whether their format is still understood.

The report has no titles, prompts or other conversation content, and your home folder is shown as ~ — Copy Report and paste it into an issue. More detail: Output panel → Session Tree for Claude Code.

Limitations

  • Needs the Claude Code extension for VS Code (opening a session uses it).
  • On Windows, live status needs Git for Windows (see above); folders and labels work without it.
  • Sessions that were already running when hooks were installed may need to be reopened.
  • "Seen" is detected by matching the active tab's title with the session title.
  • Sessions started in a different folder (e.g. a git worktree opened separately) show up in that folder's window.

Contributing

Building, testing and releasing: CONTRIBUTING.md. Bugs and ideas: issues.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft