Skip to content

Commit 2cd85fc

Browse files
committed
revert: show cooldown for errored tools to prevent loop behavior
Reverts the change that only showed cooldown on completed tools. Errored tools were getting stuck in loops because they would see prunable context and try to prune again. Now they see the cooldown message instead, which prevents immediate re-pruning.
1 parent f123eb3 commit 2cd85fc

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/state/tool-cache.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ export async function syncToolCache(
4444
state.currentTurn - turnCounter < turnProtectionTurns
4545

4646
state.lastToolPrune =
47-
(part.tool === "prune" ||
48-
part.tool === "distill" ||
49-
part.tool === "compress") &&
50-
part.state.status === "completed"
47+
part.tool === "prune" || part.tool === "distill" || part.tool === "compress"
5148

5249
const allProtectedTools = config.tools.settings.protectedTools
5350

0 commit comments

Comments
 (0)