Repository navigation
fix: session-close drops DONE when the anchor is still in progress - #298
Conversation
There was a problem hiding this comment.
No automated checks needed for a markdown-only change. Let me review the diff.
Reviewing commands/session-close.md:
The added paragraph (lines 711-712) states: when a carried-forward in_progress anchor keeps the clean verdict (modes 1 or 2), the ⚪ DONE line is replaced with the panel the anchor's own state calls for — 🟡 WAITING when items are clock-bound, 🔵 READY when the next step is the operator's.
The logic is sound: ~/.claude/CLAUDE.md forbids ⚪ DONE while the anchor is in_progress, but the mode gate lets a resolved anchor reach clean verdicts. The verbatim-rule prevents rewording the closer blocks, so the fix must substitute the right panel for the ⚪ DONE line. The two observed cases (2026-10-14 and 2026-10-15) are cited.
Reviewing CHANGELOG.md:
The Unreleased entry accurately describes the bug, the mechanism of the fix, what's in scope and out of scope, and the measured observation. Consistent with the code change.
Correctness: The fix is correct. The closer panel rules (⚪ DONE for clean verdict) conflicted with CLAUDE.md's anti-pattern rule (⚪ DONE while anchor is in_progress). The resolution is correct: keep the clean verdict (nothing is blocking), but substitute the panel that matches the anchor's actual state.
{
"verdict": "approve",
"summary": "Bugfix corrects the session-close closer panel: when a carried-forward in_progress anchor reaches the clean verdict, the ⚪ DONE line is replaced with the appropriate 🔵 READY or 🟡 WAITING panel per CLAUDE.md's own anti-pattern rule. CHANGELOG and code are consistent. No functional code changed.",
"comments": [],
"concerns_addressed": [
{
"concern": "correctness: session-close closer panel logic change — should show panel based on anchor state instead of always showing DONE",
"disposition": "addressed",
"detail": "commands/session-close.md:711-712 — clean verdict is preserved but the ⚪ DONE line is substituted with 🔵 READY or 🟡 WAITING when the anchor is still in_progress; CHANGELOG.md documents the fix in Unreleased"
}
]
}
Problem
/vault-cli:session-close§ Closer panel prescribes⚪ DONEfor every clean verdict — mode 1, mode 2, and the goal-anchored case. Its own mode gate deliberately permits reaching those verdicts when the anchor task was resolved this session but still readsin_progresson disk: "a carried-forwardin_progresstask does not block them."~/.claude/CLAUDE.mdnames exactly that an anti-pattern — "⚪ DONE while the anchored task is stillin_progress" — and requires 🔵 READY / 🟡 WAITING / 🔴 BLOCKED in its place.The two rules cannot be reconciled by wording. § Closer panel says "verbatim, no rewording", so a session that reaches mode 1 or 2 with a carried-forward anchor has no legal closer to emit: following the command breaks the memory rule, and following the memory rule breaks the command's own verbatim requirement.
Fix
One paragraph after the § Closer panel intro. It keeps the block's body unchanged and swaps its
⚪ DONEline for the panel the anchor's own state calls for — 🟡 WAITING withlater (on <trigger>):when every open item is clock-bound, 🔵 READY when the next step is the operator's. Only the anchor's own status licenses⚪ DONE.Closing a session is not the same claim as the task being finished.
Evidence
Measured 2026-10-14 and 2026-10-15: two consecutive runs reached a clean verdict with a carried-forward anchor and had to improvise the panel against this section's own verbatim rule, because no block below offered one.
Verification
make precommit— PASS (ready to commit). CHANGELOG structure OK, golangci-lint 0 issues, go vet clean, all scenario/rule suites green, 0 vulnerabilities and 0 secrets.