Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
04a0d6d
feat(tui): add plan mode command and fix plan file editing
euxarist Jul 10, 2026
5105657
feat(tui): add missing internal/planmode package
euxarist Jul 11, 2026
b75ce8e
fix(tui): address review findings on plan mode
euxarist Jul 11, 2026
8e3175b
fix(tui): address review findings on plan mode editor and safety
euxarist Jul 13, 2026
32965d8
fix(tui): address plan-mode review findings on toggle, session scopin…
euxarist Jul 13, 2026
d8dde32
fix(tui): guard exitPlanMode against clobbering non-plan permission m…
euxarist Jul 13, 2026
4a68314
fix(tui): reload plan file into memory on editor exit, preserving sta…
euxarist Jul 14, 2026
407910d
fix(tui): correct /plan command palette description
euxarist Jul 14, 2026
0c5fbc1
fix(tui,agent): address plan-mode review findings on gating, reload, …
euxarist Jul 14, 2026
3c20287
fix(tui,planmode): close editor symlink race, propagate edits to cont…
euxarist Jul 14, 2026
d8df7b2
fix(planmode,tui): harden editor staging and record cleared plans
euxarist Jul 15, 2026
7f1a04a
fix(planmode,tui,tools): physical staging containment, cancel-safe pl…
euxarist Jul 15, 2026
b54f84f
fix(planmode): resolve not-yet-existing paths through their deepest e…
euxarist Jul 15, 2026
72d3e46
fix(tui): confirm plan reload in transcript after editor exit
euxarist Jul 16, 2026
a3c2393
fix(tui,planmode,tools): close plan-mode gating and durability gaps
euxarist Jul 18, 2026
cbea391
fix(agent): suppress executable hooks while plan/spec-draft mode is a…
euxarist Jul 18, 2026
715d821
fix(tui): layer plan-mode prompt instead of replacing it
euxarist Jul 19, 2026
e2f1530
fix(agent): keep trust-gated hooks in spec-draft; harden plan allowlist
euxarist Jul 19, 2026
f188658
fix(planmode,tui): keep durable plans outside the workspace
euxarist Jul 20, 2026
a8048e8
fix(planmode): make Windows honor config-root test isolation and stag…
euxarist Jul 20, 2026
5145fac
fix(planmode): make plan storage paths collision-resistant
euxarist Jul 22, 2026
2c326f1
fix(tui): preserve active plan file content when entering plan mode
euxarist Jul 23, 2026
e0f8761
fix(tui): address review findings on plan storage workspace path, pla…
euxarist Jul 23, 2026
80fc998
fix(tui): reset plan mode on spec session switch and preserve beforeT…
euxarist Jul 31, 2026
be64cf5
fix(agent): update tests off tools.CoreTools/NewWriteFileTool removed…
euxarist Jul 31, 2026
cebe70a
fix(tui): address plan mode review (btw switch, testing dep, dead field)
euxarist Aug 1, 2026
c470443
fix(tui): polish plan-mode btw/spec edge cases from review
euxarist Aug 7, 2026
ac58990
fix(planmode,tui): address CodeRabbit findings on plan storage and re…
euxarist Aug 7, 2026
7744a0c
fix(planmode,tui,agent): close remaining CodeRabbit findings on plan …
euxarist Aug 7, 2026
0f02c32
fix(planmode): bind ReadPlan containment at open via os.Root
euxarist Aug 7, 2026
d6b080d
fix(planmode): refuse final plan symlink without following it
euxarist Aug 7, 2026
dfaff4e
fix(planmode,tui): close open CodeRabbit findings on plan mode
euxarist Aug 7, 2026
e510add
fix(planmode,tui): close remaining CodeRabbit findings on plan mode
euxarist Aug 7, 2026
e7c39ac
fix(planmode,tui): address CodeRabbit review findings and CI assertio…
euxarist Aug 8, 2026
85e224a
fix(planmode): harden plan writes and editor roundtrip
euxarist Aug 10, 2026
ac8f869
fix(tui): reconcile plan mode with main command semantics
euxarist Aug 11, 2026
2dac4c9
fix(tui): close remaining plan-mode review findings
euxarist Aug 11, 2026
7a858f5
Clarify the plan mode entry command
euxarist Aug 11, 2026
9d9da85
fix(planmode,tui): close CodeRabbit findings on plan storage and edit…
euxarist Aug 12, 2026
84b791d
fix(planmode,tui,agent): close remaining CodeRabbit findings on plan …
euxarist Aug 13, 2026
ac774d5
fix(planmode): recognize a Linux/Darwin ENOTDIR as an intermediate sy…
euxarist Aug 13, 2026
94ebb67
test(tui): pin that /plan on creates its session before naming the pl…
euxarist Aug 13, 2026
ff1b338
fix(tui): record a plan-file edit only when the plan actually changed
euxarist Aug 13, 2026
c1c2c3d
fix(planmode): refuse a symlink or reparse point at the plan storage …
euxarist Aug 13, 2026
af8b343
fix(planmode): Address CodeRabbit review feedback on plan mode and te…
euxarist Aug 16, 2026
fe1a2b2
fix(planmode,tui): Address review comments on plan reload and staging…
euxarist Aug 16, 2026
c406197
Sync peer identity when /plan enters and exits plan mode.
euxarist Aug 16, 2026
cb3a6bb
Add a Windows junction test for WritePlan storage-root refusal.
euxarist Aug 16, 2026
64dedda
Pause armed loops and goals while plan mode is active.
euxarist Aug 18, 2026
cf7601f
fix(planmode): address CodeRabbit review feedback on PR #854
euxarist Aug 20, 2026
943c77d
fix(planmode): sync dirfd on rename and update test assertion message
euxarist Aug 22, 2026
42a3044
test(planmode): Pin redirected Windows plan reads.
euxarist Aug 24, 2026
4efa296
fix(tui): Restore session state after plan-mode switches.
euxarist Aug 24, 2026
cb57063
fix(planmode): resolve Windows junctions when judging staging contain…
euxarist Aug 24, 2026
5518105
fix(tui): hold queued prompts while plan mode is active
euxarist Aug 31, 2026
ef32bd7
Address review feedback on plan persistence, isolation, and staging l…
euxarist Sep 1, 2026
61b85d1
Fix Unix build imports for plan staging and stale sweep
euxarist Sep 1, 2026
3d13bef
Tighten Unix staging directory descriptor permissions
euxarist Sep 1, 2026
218a74a
Address review feedback on plan canonicalization, Windows staging rep…
euxarist Sep 4, 2026
647601b
Address review feedback on atomic plan commit locking, continuation u…
euxarist Sep 4, 2026
d3e0074
Assert exact continuation content and test permission mode preservation.
euxarist Sep 4, 2026
9b674d8
Preserve plan edits across competing writers and clarify session life…
euxarist Sep 6, 2026
61fcf2f
Use a real alternate Unix temporary root in plan storage tests.
euxarist Sep 6, 2026
df5533e
Cancel plan publication promptly while its writer lock is held.
euxarist Sep 7, 2026
eea2fd6
Keep accepted plans consistent on save failure and preserve editor ba…
euxarist Sep 7, 2026
46f07ee
Report the failed plan operation and clarify literal continuation syn…
euxarist Sep 7, 2026
1f0645b
fix(planmode): clarify empty-vs-absent snapshot semantics and fix TMP…
euxarist Sep 9, 2026
a942c3d
fix(tui): resolve rebase conflict in agentResponseMsg
euxarist Sep 18, 2026
5fc101e
fix: address CodeRabbit minor findings on plan-mode PR
cairn-intern Sep 24, 2026
89fcb6c
chore(planmode,tui): use the Twigpine module path in plan mode files
cairn-intern Oct 18, 2026
727c5f5
fix(tui): drop the plan baseline read the rebase left unused
cairn-intern Oct 18, 2026
0f5ec0e
test(tui): isolate plan config in TestPlanCommandShowsCurrentPlan
cairn-intern Oct 18, 2026
82a808b
docs(planmode): correct the staged-file security comment and plan quo…
cairn-intern Oct 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,25 @@ Common slash commands:
| `/add-dir` | allow an extra write directory for this session |
| `/theme`, `/doctor`, `/config` | adjust appearance and inspect setup |

`/plan on` enables read-only planning for the current session; switching sessions
exits Plan mode, and returning from `/btw` restores the parent's mode. Plan updates
are accepted only after saving succeeds. A failed save reports an error and keeps
the accepted plan available to the panel, status display, and later reloads.

`/plan open` edits a protected copy through `$VISUAL` or `$EDITOR`. Newly saved
plans include a `<!-- zero-plan-format: 2 -->` marker: keep it when editing so
backslashes remain literal. To quote a literal `Notes:` line or a line beginning
with a pipe and a space, put `| ` directly after the three-space (or single-tab)
continuation indent:

```text
| Notes: this is literal content
| | this line starts with a literal pipe and space
```

Existing plans remain readable and are converted with a concurrency check before
opening the editor.

### Headless `exec`

```bash
Expand Down
17 changes: 9 additions & 8 deletions internal/agent/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,7 @@ func executeToolCall(ctx context.Context, registry *tools.Registry, call ToolCal
// the Run turn loop performs the actual provider switch. Empty for every
// ordinary tool result.
RequestedModel: result.Meta["escalate_to_model"],
PlanSnapshot: result.PlanSnapshot,
}, nil
}

Expand Down Expand Up @@ -1926,15 +1927,15 @@ func toolResultFromPrePermissionReject(call ToolCall, result tools.Result) ToolR
}
}

// hooksSuppressed reports whether advisory (non-veto) hooks must not run for
// this run's permission mode. Plan mode promises a read-only turn, but
// sessionStart/sessionEnd/afterTool hooks execute configured host commands
// outside the advertised-tool and sandbox gates, so dispatching them would let
// merely starting a plan session or finishing a read mutate the workspace.
// hooksSuppressed reports whether lifecycle and afterTool hooks must not run
// for this run's permission mode. Plan mode promises a read-only turn, but
// sessionStart, sessionEnd, and afterTool hooks execute configured host
// commands outside the advertised-tool and sandbox gates, so dispatching them
// would let merely starting or finishing a plan session mutate the workspace
// or spawn processes.
//
// beforeTool is intentionally NOT suppressed: a non-zero exit is a deny gate,
// and skipping it fails open (operators who block secret-file reads via
// beforeTool would lose that protection under /plan on). See dispatchBeforeTool.
// beforeTool is intentionally not gated here: fail-closed policy vetoes must
// still apply to read-only plan-mode calls (see dispatchBeforeTool).
//
// Spec-draft keeps the existing trust-gated hook model: project hooks still
// fire when the workspace (or its worktree trust root) is trusted. That is
Expand Down
Loading