fix: invalidate caches before initial state derivation in startAuto (#800) (#843)

This commit is contained in:
Tom Boucher 2026-03-17 10:00:24 -04:00 committed by GitHub
parent 1f67ce250b
commit 84e772f086

View file

@ -944,6 +944,11 @@ export async function startAuto(
ctx.ui.notify(`Debug logging enabled → ${getDebugLogPath()}`, "info");
}
// Invalidate all caches before initial state derivation to ensure we read
// fresh disk state. Without this, a stale cache from a prior session (e.g.
// after a discussion that wrote new artifacts) may cause deriveState to
// return pre-planning when the roadmap already exists (#800).
invalidateAllCaches();
let state = await deriveState(base);
// ── Stale worktree state recovery (#654) ─────────────────────────────────