decision-tree
Reviewed
at commit fca4b17
New version, not yet reviewed
When Claude ends a reply with a question, explains the choice in a side pane and lets you explore any option, or your own, in a real forked session
0 upvotes
Log in to upvote or save- Made by
- Ray Amjad
- Pinned commit
-
fca4b17785b1460ab7b55f570dcd5e8bdbe3ef7b - What we checked
-
When Claude ends a reply with a question, it asks a small model to confirm, then forks the conversation to explain the options in a side pane. Exploring an option runs a separate read-only claude process on a forked copy of the session. All of this uses your own Claude account and tokens, and each fork replays your conversation; nothing is sent elsewhere.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since 465d8d4; the rest carries over from the review at that commit. Registers session.start (/explain command), classic.Stop (remembers the transcript path), turn.complete, command.run for /explain and ui.render for the Decision tree pane. After each reply that looks like a question (regex), $.model.complete with a Haiku-class gate model (configurable) answers YES or NO, then $.model.fork replays the whole conversation to produce JSON options for the pane. Exploring an option (button or /explain B) runs claude -p --resume <session> --fork-session with --allowedTools Read,Grep,Glob, --disallowedTools Bash,Edit,Write,NotebookEdit and permission mode default, in the project folder with DECISION_TREE_CHILD=1 to stop recursion; the fork's answer is rendered in the pane and the fork is saved as a normal session in your Claude history. It reads the session transcript (up to 4 MiB) to find the message to fork at. Continue branch copies claude --resume <id> --fork-session to the clipboard, or opens a Herdr pane via the herdr CLI when HERDR_ENV is set. Text you type as your own answer is placed in the forked prompt. No network calls of its own. Hooks, MCP servers and other mods configured in your environment also load in the forked claude processes, which was not reviewed. New in this version: a headless flag set at session.start (isInteractive false); headless sessions register no /explain command, skip the gate and fork on turn.complete unless DECISION_TREE_WAIT=1 is set, and never try to open the pane. This only reduces activity and adds one env read.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): yes
- Sends data over the network: no
- Stores data: no
- Shows something on screen: yes
- Hooked events
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/decision-tree/)