diff --git a/src/provider/inference-dependencies.ts b/src/provider/inference-dependencies.ts index c13d7cb6d..f108e2295 100644 --- a/src/provider/inference-dependencies.ts +++ b/src/provider/inference-dependencies.ts @@ -110,10 +110,6 @@ export function createInferenceDependencies(): Promise { .then((deps) => ({ ...deps, fetch: withCodexContentTypeRepair(deps.fetch), - // Compose the first-party doom-loop exemptions into the single liveness - // hook the vendored reactor already consumes: still-pending polls and - // idempotent task bookkeeping both reset the repeat streak instead of - // counting toward the fail-run threshold. isPollOnlyPendingBatch: (calls, results) => isPollOnlyPendingBatch(calls, results) || isIdempotentTaskBatch(calls, results), diff --git a/src/subagent/idempotent-task-exempt.ts b/src/subagent/idempotent-task-exempt.ts index 3a2d7ba1d..3d490c2a1 100644 --- a/src/subagent/idempotent-task-exempt.ts +++ b/src/subagent/idempotent-task-exempt.ts @@ -3,16 +3,9 @@ import type { ToolCall, ToolResult } from "@intx/types/runtime"; /** * Doom-loop exemption for idempotent task bookkeeping. A batch is exempt only - * when it is non-empty and every executed call is a task-bookkeeping tool - * (`manage_tasks` — `isSameTool` folds the `todowrite` and `update_plan` - * aliases onto that engine id). - * - * Repeating an identical task update is legitimate bookkeeping, not a runaway - * loop: "finalize checklist" three times changes nothing and should not - * abort an otherwise-finished run under the `fail-run` policy. This resets - * the doom-loop streak (same mechanism as the poll exemption) so consecutive - * task-only batches never accumulate toward the threshold, while any real - * tool in the batch counts normally and always preserves the guard. + * when it is non-empty and every call is a task-bookkeeping tool + * (`manage_tasks` — `isSameTool` folds `todowrite` and `update_plan`). + * Mixed batches return false so the guard counts them normally. */ export function isIdempotentTaskBatch( calls: readonly ToolCall[],