Skip to content

Commit f195cfc

Browse files
committed
fix(plugin): heuristics blocked when ctx_reduce disabled and no pending ops
When ctx_reduce_enabled=false, pending ops are always 0, so the heuristic gate (hasPendingUserOps && scheduler=execute) never fired. Tool cleanup and reasoning clearing were completely blocked above the execute threshold. Removed the pending ops requirement — the scheduler already gates execute decisions properly.
1 parent 9b70f2d commit f195cfc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/plugin/src/hooks/magic-context/transform-postprocess-phase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function runPostTransformPhase(args: RunPostTransformPhaseArgs): void {
112112
!compartmentRunning &&
113113
(isExplicitFlush ||
114114
forceMaterialization ||
115-
(hasPendingUserOps && args.schedulerDecision === "execute" && !alreadyRanThisTurn));
115+
(args.schedulerDecision === "execute" && !alreadyRanThisTurn));
116116
if (shouldRunHeuristics) {
117117
const reason = isExplicitFlush
118118
? "explicit_flush"

0 commit comments

Comments
 (0)