|
5 | 5 | * hooks, an `onBeforeExecuteTool` veto listener (same-step duplicates are |
6 | 6 | * vetoed with a placeholder synthetic result), and an `onDidExecuteTool` |
7 | 7 | * hook to drive same-step suppression and cross-step repeat reminders, and |
8 | | - * reports repeat telemetry through `telemetry`. Calls rejected in preflight |
9 | | - * never reach `onBeforeExecuteTool`; the `onDidExecuteTool` hook registers |
10 | | - * them late (`registerSkipped`) so the repeat breaker still counts them. |
11 | | - * The mutable dedupe state |
| 8 | + * reports repeat telemetry through `telemetry`. The mutable dedupe state |
12 | 9 | * (`stepCalls`, `originalCallIndex`, `syntheticCallIds`, `callKeyByCallId`, |
13 | 10 | * `consecutiveKey`, `consecutiveCount`, `activeTurnId`, `activeStep`) is |
14 | 11 | * registered into `agentState` (`IAgentStateService`) and read/written |
@@ -183,10 +180,6 @@ export class AgentToolDedupeService extends Disposable implements IAgentToolDedu |
183 | 180 | } |
184 | 181 | }); |
185 | 182 | toolExecutor.hooks.onDidExecuteTool.register('toolDedupe', async (ctx, next) => { |
186 | | - // Calls rejected in preflight (e.g. invalid args) never reach |
187 | | - // onBeforeExecuteTool, so register them here — otherwise the repeat |
188 | | - // breaker cannot count them and the model can re-issue the same |
189 | | - // invalid call indefinitely. |
190 | 183 | this.registerSkipped( |
191 | 184 | ctx.toolCall.id, |
192 | 185 | ctx.toolCall.name, |
@@ -320,20 +313,6 @@ export class AgentToolDedupeService extends Disposable implements IAgentToolDedu |
320 | 313 | return { syntheticResult: null }; |
321 | 314 | } |
322 | 315 |
|
323 | | - /** |
324 | | - * Register a call that bypassed `onBeforeExecuteTool` — e.g. args |
325 | | - * validation rejected it in preflight, so the veto event never fired. |
326 | | - * Must be called before `finalizeResult` for such calls, otherwise the |
327 | | - * repeat circuit breaker never counts rejected calls and the model can |
328 | | - * re-issue the same invalid call without ever tripping the streak. |
329 | | - * No-op when the call was already registered through the normal |
330 | | - * before-execute path. |
331 | | - * |
332 | | - * `rawArguments` is the provider's raw arguments string. Args that failed |
333 | | - * JSON parsing were normalized to `{}` by the executor, which would key |
334 | | - * every malformed-but-different attempt identically; those are keyed on |
335 | | - * the raw text so only true re-issues count as repeats. |
336 | | - */ |
337 | 316 | private registerSkipped( |
338 | 317 | toolCallId: string, |
339 | 318 | toolName: string, |
|
0 commit comments