Session Recovery
Context compaction is inevitable. Sessions end. But the decision graph survives.
The Problem
When you start a new Claude session—or when the context window compacts—Claude loses memory of previous work. Without deciduous, this means:
- No memory of what decisions were made
- No knowledge of rejected alternatives
- No understanding of why things were done a certain way
With deciduous, Claude can query the graph and recover all of this.
The /context Command
At the start of a new session, the user (or Claude) runs /context:
What Gets Recovered
From the decision graph, Claude can recover:
| Information | Source |
|---|---|
| Goals being worked on | goal nodes |
| Decisions made | decision nodes + chosen edges |
| Alternatives rejected | option nodes + edge rationales |
| Why decisions were made | Edge rationales (-r) |
| User's original request | -p prompt on goal nodes |
| Current status | outcome nodes + linked commits |
Branch-Scoped Context
When working on a feature branch, filter context to that branch:
$ deciduous nodes --branch feature/auth
This shows only decisions relevant to the current feature, reducing noise from other work.
The Recovery Loop
Here's the full session lifecycle:
SESSION START
│
▼
Run /context → Query decision graph
│
▼
Claude reports: goals, decisions, status
│
▼
DO WORK → Log as you go (goals, decisions, actions)
│
▼
BEFORE PUSH → deciduous sync
│
▼
SESSION END → Graph survives
│
▼
(New session starts, repeat)
The graph acts as persistent memory that bridges session boundaries.
Context Mid-Session
You can also run /context mid-session if Claude seems to have lost track:
Recovering from Compaction
When context compacts during a long session, the decision graph provides continuity:
Long Claude sessions may "compact" older messages to make room for new ones. This is normal, but it means Claude loses the detailed reasoning from earlier in the session. The decision graph preserves it.
Even after compaction, Claude can query the graph to recall:
- What goal started this work
- What decisions were made earlier
- What the rationale was
The Audit Step
Part of context recovery includes checking for orphan nodes:
# Find nodes without incoming edges (potential orphans) $ deciduous edges | cut -d'>' -f2 | sort -u > /tmp/has_parent.txt $ deciduous nodes | awk '{print $1}' | while read id; do grep -q "^$id$" /tmp/has_parent.txt || echo "CHECK: $id" done
Root goal nodes are valid orphans. But outcome or action nodes without parents indicate missing connections that should be fixed.