Skip to content
Merged
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions apps/pi-extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,15 @@ Execute each step in order. After completing a step, include [DONE:n] in your re
}

if (phase === "idle") {
await restoreSavedState(ctx);
savedState = null;
if (savedState) {
await restoreSavedState(ctx);
savedState = null;
} else {
// Strip planning-only tools on fresh sessions where savedState is null.
// Without this, plannotator_submit_plan stays in the active tool set
// even though plan mode hasn't been activated. See #387.
pi.setActiveTools(stripPlanningOnlyTools(pi.getActiveTools()));
}
} else if (phase === "planning" || phase === "executing") {
await applyPhaseConfig(ctx, { restoreSavedState: true });
}
Expand Down