Skip to main content

Module plan

Module plan 

Source
Expand description

Plan-file signal. In plan mode claude writes the plan to a markdown file under ~/.claude/plans/ before the approval gate, and the plan content lives in that file rather than the transcript message (PoC §3.3).

NOTE: the filename is NOT plan-*.md (the PoC’s guess) — on claude v2.1.158 it is a slug of the prompt plus random words, e.g. make-a-trivial-plan-parsed-whisper.md. So we match any *.md.

The plans dir is GLOBAL (not per-session), so we correlate by time: a *.md modified at or after the session’s spawn epoch is attributed to it. This is a documented heuristic — the combiner additionally requires the capture-pane plan marker before declaring plan_ready, which makes a stale-file false positive harmless.

Functions§

latest_plan_file
The newest plan-*.md modified at/after since_epoch, with its content if readable.