Skip to content

Commit b1eb95c

Browse files
committed
style(reactor): drop essay comments from task doom-loop exemption
1 parent 9b8ba29 commit b1eb95c

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

‎src/provider/inference-dependencies.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ export function createInferenceDependencies(): Promise<Dependencies> {
110110
.then((deps) => ({
111111
...deps,
112112
fetch: withCodexContentTypeRepair(deps.fetch),
113-
// Compose the first-party doom-loop exemptions into the single liveness
114-
// hook the vendored reactor already consumes: still-pending polls and
115-
// idempotent task bookkeeping both reset the repeat streak instead of
116-
// counting toward the fail-run threshold.
117113
isPollOnlyPendingBatch: (calls, results) =>
118114
isPollOnlyPendingBatch(calls, results) ||
119115
isIdempotentTaskBatch(calls, results),

‎src/subagent/idempotent-task-exempt.ts‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@ import type { ToolCall, ToolResult } from "@intx/types/runtime";
33

44
/**
55
* Doom-loop exemption for idempotent task bookkeeping. A batch is exempt only
6-
* when it is non-empty and every executed call is a task-bookkeeping tool
7-
* (`manage_tasks` — `isSameTool` folds the `todowrite` and `update_plan`
8-
* aliases onto that engine id).
9-
*
10-
* Repeating an identical task update is legitimate bookkeeping, not a runaway
11-
* loop: "finalize checklist" three times changes nothing and should not
12-
* abort an otherwise-finished run under the `fail-run` policy. This resets
13-
* the doom-loop streak (same mechanism as the poll exemption) so consecutive
14-
* task-only batches never accumulate toward the threshold, while any real
15-
* tool in the batch counts normally and always preserves the guard.
6+
* when it is non-empty and every call is a task-bookkeeping tool
7+
* (`manage_tasks` — `isSameTool` folds `todowrite` and `update_plan`).
8+
* Mixed batches return false so the guard counts them normally.
169
*/
1710
export function isIdempotentTaskBatch(
1811
calls: readonly ToolCall[],

0 commit comments

Comments
 (0)