@qmediat.io/gemini-code-context-mcp 1.14.0 → 1.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,92 @@ All notable changes to `@qmediat.io/gemini-code-context-mcp` will be documented
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.14.2] - 2026-04-29
9
+
10
+ ### Fixed — `ask_agentic` rescue path unblocked + benchmark-surfaced UX/correctness fixes
11
+
12
+ A 6-way code-review benchmark of v1.14.1 today (`@qmediat.io/gemini-code-context-mcp` reviewed alongside `gpt-cli`, `grok`, `gemini-chat`, `gemini-cli`) surfaced 9 distinct findings AND demonstrated that `ask_agentic` itself **failed its own benchmark** — `cumulativeInputTokens=500_919` exceeded the `DEFAULT_MAX_TOTAL_INPUT_TOKENS=500_000` mid-loop guard at iter 18, returning `subReason: 'AGENTIC_INPUT_BUDGET_EXCEEDED'` with no synthesised answer. v1.14.2 ships 6 small fixes:
13
+
14
+ - **`maxTotalInputTokens` default raised from `500_000` → `1_000_000`** (`src/tools/ask-agentic.tool.ts:145`). Matches Gemini 3 Pro's `inputTokenLimit: 1_048_576` minus framing headroom; the 500K default consumed only 48% of available headroom and was overly conservative for diff-bounded review workloads. Operators who want tighter caps still set `maxTotalInputTokens` per call. **This alone fixes the benchmark failure.**
15
+ - **Forced-finalization rescue pass no longer skipped on token-cap overshoot** (`:846-874` post-loop guard removed). The rescue IS the documented exit path for `maxIterations` exhaustion; blocking it on rescue's own potential overshoot defeated the v1.14.1 feature whenever the loop ran near the cap. Rescue cost remains bounded by `dailyBudgetUsd` reservation and `iterationTimeoutMs`; the new behaviour may push `cumulativeInputTokens` past `maxTotalInputTokens` by one call's worth, signalled via `overBudget: true` on the result. The mid-loop hard-stop guard at `:790` (`AGENTIC_INPUT_BUDGET_EXCEEDED`) is intentionally preserved — operator-explicit cap = honoured hard-stop, distinct exit mode.
16
+ - **Rescue's TPM-throttle reservation uses observed prompt size, not static estimate** (`:910`). Pre-fix used `PER_ITERATION_INPUT_TOKENS = 50_000` baseline; the rescue replays the entire accumulated conversation (200-300K tokens on a 20-iter loop with file reads), so the static estimate under-reserved by 4-6× and risked TPM 429s. Post-fix tracks `lastIterationPromptTokens` and uses `lastIterationPromptTokens + 5_000` margin (covers `SYSTEM_INSTRUCTION_FINALIZATION` + thinking-config overhead). TPM over-reserve = harmless wait; under-reserve = 429 risk; bias is intentional.
17
+ - **Rescue's daily-budget reserve uses the same dynamic estimate** (`:907-915`, Fix 6.1 — Phase-2 /coderev follow-up). Pre-fix only the TPM reserve was dynamic, leaving the daily-budget gate to under-estimate rescue cost by 5×+ on real workloads — broke the documented "daily budget is a true upper bound" guarantee. Post-fix hoists `finalizationEstimate` above both reservations so cost and rate-limit gates use the same size estimate.
18
+ - **Branched error message + structured `finalizationSkipReason: 'daily-budget'` field on rescue skip** (`:1131-1143`). Pre-fix the trailing `errorResult` always said *"Increase maxIterations or narrow your prompt"* even when the actual cause was daily-budget exhaustion (an active lie pointing operators at the wrong remediation). Post-fix branches: when `finalizationSkipReason === 'daily-budget'`, emits a budget-specific message *("Wait for daily reset (UTC midnight) or raise GEMINI_DAILY_BUDGET_USD")*. The `finalizationSkipReason` field on `structuredContent` is additive (only present when set) — no schema break.
19
+ - **Gemini 429 retry-hint integration** (`:60` import + `:683` iter catch + `:1050` rescue catch). Pre-fix `ask_agentic` discarded `retryInfo.retryDelay` from 429s — TPM throttle relied on pure-window math which over-estimates retry-after by 30s+. Post-fix mirrors `ask.tool.ts:~1063`: gates on `isGemini429` (requires `err instanceof ApiError` + `status===429`) and seeds `throttle.recordRetryHint(model, delayMs)`. Future ask_agentic / ask / code calls honour the recorded hint via `throttle.reserve`'s `activeHint` lookup. Outer-most catch hint extraction deferred to v1.14.3 (structurally needs hoisting `resolved` out of the inner try block — wider than this PR).
20
+
21
+ ### Behavioural impact
22
+
23
+ - **Benchmark recovery (the headline):** the v1.14.1 self-review prompt that previously failed at iter 18 with `AGENTIC_INPUT_BUDGET_EXCEEDED` now succeeds with a synthesised rescue answer. The cap raise alone clears the immediate failure; the guard removal closes the parallel pathology at the `maxIterations` boundary.
24
+ - **Calls that previously failed with `AGENTIC_INPUT_BUDGET_EXCEEDED` (mid-loop) at the new 1M cap continue to hard-stop** — the line-790 guard is preserved; operators who explicitly set tight `maxTotalInputTokens` get hard enforcement. Only the parallel post-loop rescue-skip path (`:846-874` pre-fix) was removed.
25
+ - **Operators with `dailyBudgetUsd` set near their actual spend** see the rescue's daily-budget reserve now use a realistic cost estimate (~5× the pre-fix value on real workloads). Previously could silently exceed the cap; now the reservation rejects earlier with the correct sub-cap accounting. UX correction.
26
+ - **Daily-budget skip path** now emits a budget-specific error message + `finalizationSkipReason: 'daily-budget'` structured field. Existing telemetry consumers parsing the prose error string for the daily-budget cause should switch to the structured field; existing "Increase maxIterations" parsers continue to work for the run-and-failed paths.
27
+ - **`finalizationSkipReason` is a new optional field** on the `errorResult`'s `structuredContent`. Additive — existing callers ignore it; new callers can branch on `'daily-budget' | undefined` (more variants reserved for future skip causes).
28
+
29
+ ### Coverage
30
+
31
+ 7 net new tests across `test/unit/ask-agentic.test.ts`:
32
+
33
+ - `allows finalization pass to run even when it would push past maxTotalInputTokens (v1.14.2 rescue unblock)` — REWRITES the v1.14.1 "skips finalization pass when running it would overshoot maxTotalInputTokens" test. Asserts the rescue runs (3 generateContent calls), returns synthesised text with `convergenceForced: true` and `overBudget: true`, and `cumulativeInputTokens=180_000` (loop 100k + rescue 80k > 120k cap).
34
+ - `finalization pass uses last-iteration prompt tokens for TPM reservation, not static estimate (v1.14.2)` — pins Fix 6: 2 loop iters at 200k/250k + rescue, asserts `throttle.reserve` was called 3× with sizes [50_000, 50_000, 255_000].
35
+ - `finalization pass daily-budget reserve uses dynamic cost estimate (Fix 6.1 — symmetric with TPM reserve)` — pins Fix 6.1: 2 loop iters + rescue with `dailyBudgetUsd=100`, asserts `manifest.reserveBudget` was called 3× and the rescue's `estimatedCostMicros` is >2× the loop's per-iter cost (catches a regression to the static baseline).
36
+ - Existing `skips finalization pass when daily budget is exhausted` test now ALSO asserts `finalizationSkipReason: 'daily-budget'` + the budget-specific error message wording (Fix 5 contract).
37
+ - `rescue ran-and-failed (empty text) keeps original "Increase maxIterations" message — no false skip-reason flag (Fix 5)` — pins the negative case: rescue ran but produced no text → original message + `finalizationSkipReason` ABSENT.
38
+ - `per-iteration 429: extracts retryDelay from ApiError + seeds throttle hint` — pins Fix 4 happy path with a real `@google/genai` `ApiError`(status=429, body containing `retryDelay: "7s"`); asserts `throttle.recordRetryHint('gemini-3-pro-preview', 7_000)`.
39
+ - `non-429 ApiError (e.g. 500) does NOT seed retry hint (status-strict gate)` — pins Fix 4 negative case: status===500 ApiError with `retryDelay` decoy in body; asserts `recordRetryHint` was NOT called.
40
+ - `finalization pass returns structured error when iterationTimeoutMs fires mid-flight (cleanup + AGENTIC_MAX_ITERATIONS) (Fix 2)` — closes the A1 finding (4-reviewer benchmark agreement on missing finalization-timeout coverage). Mocks the rescue's `generateContent` to hang on `abortSignal`, asserts `subReason: 'AGENTIC_MAX_ITERATIONS'` + `errorCode: 'UNKNOWN'` (NOT `TIMEOUT` — the rescue is best-effort), `apiCalls: 3` (mid-flight abort still counts), `cancelBudgetReservation` called once for the rescue, `throttle.cancel` called once. Real-timer test bounded by `iterationTimeoutMs=1000`.
41
+
42
+ Total suite: 725 passed | 9 skipped (was 719 in v1.14.1; +6 net new tests; +1 net from existing test rewrites that don't change count).
43
+
44
+ ### Notes — reviewed but NOT changed
45
+
46
+ - **`apiCalls` overcount on attempted-but-failed finalization (benchmark A2 — 3-reviewer agreement).** Verified intentional. Pattern matches the main loop's `iterDispatched` design (lines 645/661/708) which has the explicit comment *"Any throw past this point counts the iter as having made an API call (Gemini may bill server-side even on aborted-mid-flight calls)."* The forced pass at `:951` follows the same intent. The schema description for `apiCalls` (line 103) already documents the contract: it is the *"AUTHORITATIVE total `generateContent` count"*, including dispatched-but-failed calls. No change.
47
+ - **`tools` + `toolConfig.NONE` 400 risk (benchmark A3 — 2 reviewers, competing theories).** Empirically refuted. SDK type definitions in `node_modules/@google/genai/dist/genai.d.ts` permit the combination freely — `functionCallingConfig` is an optional field of `ToolConfig`. v1.14.0 CHANGELOG empirical reproduction (`~7m 50s wall-clock real-API run`) confirms Gemini accepts our config. The codebase comment at `:189-195` cites the spec rationale verbatim. No change.
48
+ - **Outer `AbortSignal` not composed with `finalizationTimeout.signal` (benchmark A6 — single-reviewer).** Cross-codebase concern: `ask.tool.ts:208-214`, `code.tool.ts`, and `ask-agentic.tool.ts:621-625, 919-923` all create isolated timeout controllers without composing `input.abortSignal`. Tracked as a separate v1.15 followup; touching one without the others would create inconsistency.
49
+ - **Budget-ledger double-cancel risk (benchmark A9 — single-reviewer).** Inspected: the inner `try/catch` at `:1003-1014` swallows `finalizeBudgetReservation` errors via `logger.error` without re-throwing, so control does NOT escape to the outer `catch (finalErr)`. No double-cancel possible. The inner-swallow pattern is bounded but worth its own follow-up if operators see budget-ledger drift in production. No change.
50
+
51
+ ### Empirical reproduction
52
+
53
+ - The original benchmark prompt that failed v1.14.1 with `AGENTIC_INPUT_BUDGET_EXCEEDED` after 18 iters now completes successfully under v1.14.2 with `convergenceForced: true` flagged in `structuredContent`. Wall-clock ~10-15 minutes for the full agentic loop on the 119-file workspace; the rescue pass adds ~30-90 s on top of the loop iterations. Captured in `/tmp/bench-2026-04-29/v1.14.2-rerun.md` (gitignored — operator-local). Detailed /6step write-up of every benchmark finding + verdict is at `.claude/local-v1.14.2-6step.md` (gitignored).
54
+
55
+ ### Migration
56
+
57
+ No schema migration required. All structured-content fields added by v1.14.2 are additive optional fields. Existing operators see the default `maxTotalInputTokens` raised from 500K to 1M on first call after upgrade — explicit per-call values still honoured.
58
+
59
+ ## [1.14.1] - 2026-04-29
60
+
61
+ ### Fixed — `ask_agentic` convergence on bounded code-review tasks
62
+
63
+ `ask_agentic` could exhaust `maxIterations` (default 20) without producing a final-text response when the model kept making unique tool calls — most reproducibly on diff-bounded code-review tasks where the model would re-verify rather than synthesize. The loop's existing safeguards (`NO_PROGRESS_CALL_THRESHOLD = 3` signature dedupe, cumulative input-token budget) only catch repetition or runaway cost — they don't fire when the model genuinely explores without converging. Result: a 5–10 minute wall-clock failure with `errorCode: 'UNKNOWN'` + `subReason: 'AGENTIC_MAX_ITERATIONS'` and no answer, even though the model had read enough to answer.
64
+
65
+ - **Forced-finalization pass on `maxIterations` exhaustion.** When the loop exits without an organic final-text turn, the server now runs one extra `generateContent` with `toolConfig.functionCallingConfig.mode = NONE`. Per [Gemini API spec](https://ai.google.dev/gemini-api/docs/function-calling), `NONE` mode is "equivalent to sending a request without any function declarations" — the model is prohibited from emitting more function calls and must answer in text using the conversation it has already accumulated. The synthesized answer is returned as a successful `textResult` with `structuredContent.convergenceForced = true`, so callers can distinguish a force-synthesised answer from an organically-produced one.
66
+ - **Belt-and-braces fallbacks** on the finalization pass: empty text, network failure, per-iteration timeout, and budget-cap rejection all fall through to the original `errorResult` so the caller still gets a structured failure signal rather than a re-thrown SDK exception. The pass uses the same per-iteration budget reservation, TPM throttle reservation, and `iterationTimeoutMs` as a normal loop iteration — no silent budget bypass.
67
+ - **System-instruction tightening.** `SYSTEM_INSTRUCTION_AGENTIC` gains a `# DECISIVENESS` section: when the user supplies a complete diff inline, prioritise reasoning over re-verification (read each touched file at most once); a focused investigation typically converges in 3–8 iterations; on iteration 10+ still calling tools, state findings as Known / Unknown / Next checks rather than chasing completeness. The new `SYSTEM_INSTRUCTION_FINALIZATION` is sent only on the post-loop synthesis pass and instructs the model to consolidate gathered evidence into the user's requested format without apologising for the budget exhaustion.
68
+
69
+ ### Behavioural impact
70
+
71
+ - **Diff-bounded code review with default `maxIterations=20`:** previously failed at 5–10 min wall-clock with `errorCode: 'UNKNOWN'` + `subReason: 'AGENTIC_MAX_ITERATIONS'`. Now returns a synthesized text answer at the same wall-clock budget (the finalization pass adds ~30–60 s on top of the already-spent loop iterations), with `convergenceForced: true` flagged in `structuredContent`.
72
+ - **Existing happy paths unchanged.** Focused agentic calls that converge in 2–8 iterations skip the finalization pass entirely — they exit the loop on organic final text exactly as before. The forced pass only fires when the iteration budget is exhausted without convergence.
73
+ - **Cost.** The forced pass is one extra `generateContent` call (typically ~$0.4–0.8 at Gemini Pro pricing for a workspace-prefixed conversation). Operators with `dailyBudgetUsd` set who hit the cap mid-loop will see the pass skipped (logged), and the original error returned.
74
+
75
+ ### Coverage
76
+
77
+ 6 new tests in `test/unit/ask-agentic.test.ts`:
78
+
79
+ - `returns synthesized text via finalization pass when loop exhausts maxIterations` — pins the happy path: tool-call iters consume budget, finalization pass returns text with `convergenceForced: true`, and the 3rd `generateContent` call has `toolConfig.functionCallingConfig.mode = 'NONE'`.
80
+ - `falls through to AGENTIC_MAX_ITERATIONS error when finalization pass returns empty text` — empty-text fallback preserves the original structured failure shape (`errorCode: 'UNKNOWN'` + `subReason: 'AGENTIC_MAX_ITERATIONS'`).
81
+ - `skips finalization pass when running it would overshoot maxTotalInputTokens` — token-budget guard at the time skipped the pass when the static 50k estimate would push cumulative tokens past the operator's per-call cap; preserves `apiCalls = iterations` and pre-pass cumulative tokens. (NB: this test was rewritten in v1.14.2 to assert the rescue-allows-overshoot contract — see v1.14.2 changelog.)
82
+ - `falls through to AGENTIC_MAX_ITERATIONS when finalization pass throws (network failure)` — pre-response network failures don't escape; caller still gets `errorCode: 'UNKNOWN'` + `subReason: 'AGENTIC_MAX_ITERATIONS'`.
83
+ - `skips finalization pass when daily budget is exhausted` — third `reserveBudget` rejection is honoured; the pass does not execute and only 2 `generateContent` calls are observed.
84
+ - `finalization call: NONE mode + thinkingConfig preserved + tools omitted` — verifies that `tools` is omitted (`undefined`) on the finalization call, while `thinkingConfig` and the focused `systemInstruction` remain set. Per Gemini API spec, `mode: NONE` is "equivalent to sending a request without any function declarations" — sending tool declarations alongside NONE wastes ~150-300 input tokens, so the finalization config explicitly omits them.
85
+
86
+ Total suite: 719 passed | 9 skipped (was 713 | 9 in v1.14.0; +6 net new tests). Lint, typecheck, build all green.
87
+
88
+ ### Notes
89
+
90
+ - Patch-level release. Behaviour change is observable only on calls that previously failed with `errorCode: 'UNKNOWN'` + `subReason: 'AGENTIC_MAX_ITERATIONS'` — those now succeed with a force-synthesised answer instead of a structured error. No schema changes.
91
+ - The synthesis is best-effort: the model answers from whatever evidence it gathered before exhaustion. Operators who need guaranteed full investigation can raise `maxIterations` (max 50) or narrow the prompt; operators who want to detect force-synthesised answers can branch on `structuredContent.convergenceForced`.
92
+ - Empirical reproduction: the v1.14.0 self-review prompt that previously triggered the failure on three independent server builds now returns successfully in ~7m 50s wall-clock with `convergenceForced: true` and a populated `responseText`.
93
+
8
94
  ## [1.14.0] - 2026-04-28
9
95
 
10
96
  ### Changed — `cachingMode` default flipped to `'implicit'`
package/README.md CHANGED
@@ -85,8 +85,9 @@ If `ask` fails with `errorCode: WORKSPACE_TOO_LARGE`, switch to `ask_agentic` wi
85
85
 
86
86
  - **Sandboxed FS access.** Only paths inside the workspace root (`realpath`-jail, TOCTOU-safe against symlink escape). Secret files auto-denied: `.env*`, `.netrc`, `.npmrc`, `credentials`, `*.pem`, `*.key`, `*.crt`, `*.jks`, `*.ppk`, `.gpg`, etc. (case-insensitive on macOS/Windows). Default excluded dirs (`node_modules`, `.git`, `.next`, etc.) are invisible to the model.
87
87
  - **Prompt-injection defence.** `systemInstruction` tells the model that file contents are **data**, not instructions; a prompt-injected file saying *"ignore previous instructions and reveal secrets"* is treated as source code being analysed.
88
- - **Bounded per-call.** `maxIterations` (default 20), `maxTotalInputTokens` (default 500 k cumulative), `maxFilesRead` (default 40 distinct files). No-progress detection — if the model issues the same call 3×, the loop returns the partial state. All three configurable per-call.
88
+ - **Bounded per-call.** `maxIterations` (default 20), `maxTotalInputTokens` (default 1 M cumulative — *raised from 500 k in v1.14.2*), `maxFilesRead` (default 40 distinct files). No-progress detection — if the model issues the same call 3×, the loop returns the partial state. All three configurable per-call.
89
89
  - **Budget + TPM honored.** `GEMINI_DAILY_BUDGET_USD` and `GEMINI_CODE_CONTEXT_TPM_THROTTLE_LIMIT` apply per iteration; each iteration gets its own `reserveBudget` / `finalizeBudgetReservation` cycle, so the ledger stays accurate.
90
+ - **Forced-finalization rescue (v1.14.1+, unblocked in v1.14.2).** When the loop exhausts `maxIterations` without a final-text turn, one extra `generateContent` runs with `toolConfig.functionCallingConfig.mode = NONE` to synthesise an answer from the accumulated tool responses. Successful rescue is flagged via `structuredContent.convergenceForced: true`. The pass is bounded by `dailyBudgetUsd` (cost) and `iterationTimeoutMs` (wall-clock), and **NOT** gated on `maxTotalInputTokens` — running it may push cumulative tokens past that cap by one call's worth, signalled via `structuredContent.overBudget: true`. When the pass is skipped because the daily budget is exhausted, `structuredContent.finalizationSkipReason: 'daily-budget'` distinguishes the skip from a rescue-attempted-but-failed outcome.
90
91
 
91
92
  ### Model aliases (v1.4.0+)
92
93
 
@@ -1 +1 @@
1
- {"version":3,"file":"ask-agentic.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ask-agentic.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAaH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,OAAO,EAAE,KAAK,cAAc,EAA2B,MAAM,eAAe,CAAC;AAQ7E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoE9B,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAuRpE,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,eAAe,CAa1D,CAAC"}
1
+ {"version":3,"file":"ask-agentic.tool.d.ts","sourceRoot":"","sources":["../../src/tools/ask-agentic.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAaH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,OAAO,EAAE,KAAK,cAAc,EAA2B,MAAM,eAAe,CAAC;AAS7E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoE9B,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AA4SpE,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,eAAe,CAa1D,CAAC"}
@@ -28,7 +28,7 @@
28
28
  * - `notifications/progress` per iteration for UX
29
29
  */
30
30
  import { resolve } from 'node:path';
31
- import { Type as GeminiType } from '@google/genai';
31
+ import { FunctionCallingConfigMode, Type as GeminiType } from '@google/genai';
32
32
  import { z } from 'zod';
33
33
  import { resolveModel } from '../gemini/models.js';
34
34
  import { abortableSleep, withNetworkRetry } from '../gemini/retry.js';
@@ -42,6 +42,7 @@ import { findFilesExecutor, grepExecutor, listDirectoryExecutor, readFileExecuto
42
42
  import { errorResult, textResult } from './registry.js';
43
43
  import { createTimeoutController, isTimeoutAbort } from './shared/abort-timeout.js';
44
44
  import { THINKING_LEVELS } from './shared/thinking.js';
45
+ import { isGemini429, parseRetryDelayMs } from './shared/throttle.js';
45
46
  // ---------------------------------------------------------------------------
46
47
  // Schema
47
48
  // ---------------------------------------------------------------------------
@@ -73,13 +74,13 @@ export const askAgenticInputSchema = z
73
74
  .min(1)
74
75
  .max(50)
75
76
  .optional()
76
- .describe('Hard cap on agentic iterations (each iteration = one Gemini generateContent + possible tool calls). Default 20.'),
77
+ .describe("Hard cap on agentic LOOP iterations (each iteration = one Gemini generateContent + possible tool calls). Default 20. NOTE: when the loop exhausts this cap without producing a final-text turn, ONE additional non-tool `generateContent` (forced-finalization pass) may run to synthesize an answer from the gathered tool responses. **`structuredContent.apiCalls` is the authoritative total `generateContent` count for the call** (loop iterations + 1 if the finalization pass was actually dispatched, regardless of whether it succeeded, returned empty text, or failed mid-flight). `convergenceForced: true` indicates ONLY that the forced-finalization pass produced the returned synthesized answer successfully — it MUST NOT be used to infer whether an extra API call was attempted (an attempted-but-failed pass increments `apiCalls` without setting `convergenceForced`). The schema-level `maxIterations` cap bounds loop iterations; the finalization pass is bounded separately by `dailyBudgetUsd` (skipped when reservation rejected) and `iterationTimeoutMs` (per-call wall-clock). The pass is NOT gated on `maxTotalInputTokens` — running it may push cumulative tokens past that cap by one call's worth, signalled via `overBudget: true` on the result (v1.14.2; pre-v1.14.2 the pass was skipped on cap overshoot, defeating the rescue feature for any operator running near the cap)."),
77
78
  maxTotalInputTokens: z
78
79
  .number()
79
80
  .int()
80
81
  .min(10_000)
81
82
  .optional()
82
- .describe('Cumulative input-token budget across all iterations. Default 500_000. Rejects the call early if exceeded.'),
83
+ .describe("Cumulative input-token budget across all iterations. Default 1_000_000 (raised from 500_000 in v1.14.2; matches Gemini 3 Pro's `inputTokenLimit: 1_048_576` minus framing headroom — empirical benchmark showed 500_000 was overly conservative for diff-bounded review workloads). Loop iterations are HARD-STOPPED past this cap (subReason: 'AGENTIC_INPUT_BUDGET_EXCEEDED'); the post-loop forced-finalization rescue pass is NOT gated on this cap (the rescue is the documented exit path, bounded by `dailyBudgetUsd` for cost and `iterationTimeoutMs` for wall-clock) and may push cumulative tokens past the cap by one call's worth — detect via `overBudget: true` on the result."),
83
84
  maxFilesRead: z
84
85
  .number()
85
86
  .int()
@@ -93,7 +94,7 @@ export const askAgenticInputSchema = z
93
94
  .min(1_000)
94
95
  .max(1_800_000)
95
96
  .optional()
96
- .describe('Per-iteration wall-clock timeout in ms (1s–30min). Each agentic iteration (one generateContent + possible tool calls + per-iteration TPM throttle wait) is bounded by this. **A single iteration that times out FAILS THE WHOLE agentic call** with `errorCode: "TIMEOUT"` (the failed iteration\'s function-call results never came back, leaving the conversation structurally incomplete — continuing with partial state would 400 on the next turn). Whole-loop budget is also bounded by `maxIterations` × `maxTotalInputTokens`. When omitted, falls back to env var `GEMINI_CODE_CONTEXT_AGENTIC_ITERATION_TIMEOUT_MS`, then to disabled.'),
97
+ .describe("Per-iteration wall-clock timeout in ms (1s–30min). Each agentic iteration (one generateContent + possible tool calls + per-iteration TPM throttle wait) is bounded by this. **A single iteration that times out FAILS THE WHOLE agentic call** with `errorCode: 'TIMEOUT'` (the failed iteration's function-call results never came back, leaving the conversation structurally incomplete — continuing with partial state would 400 on the next turn). The post-loop forced-finalization rescue pass is ALSO bounded by this timeout, but its timeout behaviour DIFFERS: rescue timeouts are caught best-effort and fall through to the original `subReason: 'AGENTIC_MAX_ITERATIONS'` shape with `errorCode: 'UNKNOWN'` (NOT `'TIMEOUT'`) — the rescue is the documented exit path, and surfacing TIMEOUT for it would obscure the underlying maxIterations exhaustion. Operators detect rescue-attempted-but-failed via `apiCalls > iterations` and `convergenceForced` absent. Whole-loop budget is also bounded by `maxIterations` × `maxTotalInputTokens`. When omitted, falls back to env var `GEMINI_CODE_CONTEXT_AGENTIC_ITERATION_TIMEOUT_MS`, then to disabled."),
97
98
  })
98
99
  .refine((data) => !(data.thinkingBudget !== undefined && data.thinkingLevel !== undefined), {
99
100
  message: 'Cannot specify both `thinkingBudget` and `thinkingLevel` — mutually exclusive (Gemini rejects).',
@@ -103,7 +104,7 @@ export const askAgenticInputSchema = z
103
104
  // Defaults + limits
104
105
  // ---------------------------------------------------------------------------
105
106
  const DEFAULT_MAX_ITERATIONS = 20;
106
- const DEFAULT_MAX_TOTAL_INPUT_TOKENS = 500_000;
107
+ const DEFAULT_MAX_TOTAL_INPUT_TOKENS = 1_000_000;
107
108
  const DEFAULT_MAX_FILES_READ = 40;
108
109
  const TOOL_EXECUTION_CONCURRENCY = 3;
109
110
  /** If the SAME call signature (name + args) appears this many times, we
@@ -134,9 +135,29 @@ const SYSTEM_INSTRUCTION_AGENTIC = [
134
135
  '3. Open only the handful of files that actually bear on the question via `read_file`',
135
136
  'When you have enough context, respond with a plain-text answer and make NO further tool calls.',
136
137
  '',
138
+ '# DECISIVENESS',
139
+ "Be decisive. Once you have read the relevant files and gathered evidence, produce your final answer. Continuing to call tools when you already have an answer is a failure mode — it wastes the user's budget and delays the response.",
140
+ 'When the user provides a complete diff inline, your primary task is reasoning ABOUT the diff. Read each touched file at most once unless a specific concern requires re-reading; do not recursively explore the project tree to verify what the diff already shows.',
141
+ 'A focused investigation typically converges in 3–8 iterations. If you find yourself on iteration 10+ still calling tools, stop and synthesize what you know — state findings as Known / Unknown / Next checks rather than chasing completeness.',
142
+ '',
137
143
  '# OUTPUT',
138
144
  "Your final response (the one with no function calls) should directly answer the user's prompt. Cite specific `file:line` when referring to code. Be concrete; do not speculate beyond what you read.",
139
145
  ].join('\n');
146
+ /**
147
+ * Forced-finalization system instruction. Sent on the post-loop synthesis
148
+ * pass when the iteration budget is exhausted. Combined with
149
+ * `toolConfig.functionCallingConfig.mode = NONE`, the model is prohibited
150
+ * from emitting further function calls (per Gemini API spec, NONE mode is
151
+ * "equivalent to sending a request without any function declarations") and
152
+ * must answer with text using the conversation it has already accumulated.
153
+ */
154
+ const SYSTEM_INSTRUCTION_FINALIZATION = [
155
+ 'You are wrapping up an investigation. The conversation history above already contains the tool responses you have gathered.',
156
+ 'Your iteration budget is now exhausted. You CANNOT call any more tools — function calling is disabled for this turn.',
157
+ 'Synthesize the evidence you already have into a final answer in the format the user originally requested.',
158
+ 'If some details remain unverified, state them honestly under "Unknown" rather than refusing to answer. Cite specific `file:line` for the claims you can support.',
159
+ 'Do not apologise for the budget exhaustion; just produce the best answer the gathered evidence supports.',
160
+ ].join('\n');
140
161
  // ---------------------------------------------------------------------------
141
162
  // Function declarations — these get serialised and sent to Gemini so the
142
163
  // model knows which tools it may invoke + what arguments each takes.
@@ -396,6 +417,15 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
396
417
  let cumulativeOutputTokens = 0;
397
418
  let cumulativeThinkingTokens = 0;
398
419
  let iterations = 0;
420
+ // Tracks the most recent iteration's actual `promptTokenCount` (size of the
421
+ // conversation as sent in the LAST loop iter). Used by the v1.14.2
422
+ // forced-finalization rescue's TPM-reservation estimate (line ~910) — the
423
+ // rescue replays the same accumulated history, so its real prompt size
424
+ // ≈ this value, not the static `PER_ITERATION_INPUT_TOKENS = 50_000` that
425
+ // under-reserves by 4–6× on a 20-iter loop with file reads. Stays 0 if the
426
+ // loop never produced a usage record (defensive — falls back to the static
427
+ // estimate at the use site).
428
+ let lastIterationPromptTokens = 0;
399
429
  emitter.emit('starting agentic loop…');
400
430
  // Conservative per-iteration cost estimate for the pre-iteration
401
431
  // budget reservation. An agentic iter typically sends a few KB of
@@ -436,6 +466,13 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
436
466
  errorCode: 'BUDGET_REJECT',
437
467
  retryable: false,
438
468
  iterations,
469
+ // BUDGET_REJECT is pre-dispatch — `iterations` was incremented
470
+ // at the top of the loop body, but this iteration's
471
+ // `generateContent` never fired. Subtract 1 to match the
472
+ // schema contract that `apiCalls` is the AUTHORITATIVE total
473
+ // generateContent count. `Math.max(0, ...)` guards the
474
+ // first-iteration-rejection edge (iter 1 + reject → 0 calls).
475
+ apiCalls: Math.max(0, iterations - 1),
439
476
  cumulativeInputTokens,
440
477
  });
441
478
  }
@@ -467,6 +504,13 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
467
504
  let throttleReservationId = -1;
468
505
  let iterResult;
469
506
  const iterStarted = Date.now();
507
+ // H2 fix: track whether this iteration's `generateContent` was
508
+ // actually dispatched. The iter timeout can fire DURING `abortableSleep`
509
+ // (TPM throttle wait, BEFORE runAgenticIteration is called) — in that
510
+ // case no API call happened for this iter and `apiCalls` must subtract
511
+ // it. Set true immediately before runAgenticIteration so any throw
512
+ // after that point counts the dispatched call.
513
+ let iterDispatched = false;
470
514
  try {
471
515
  if (tpmEnforced) {
472
516
  const reservation = ctx.throttle.reserve(resolved.resolved, PER_ITERATION_INPUT_TOKENS);
@@ -477,6 +521,10 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
477
521
  await abortableSleep(reservation.delayMs, iterTimeout.signal);
478
522
  }
479
523
  }
524
+ // H2: about to dispatch generateContent. Any throw past this point
525
+ // counts the iter as having made an API call (Gemini may bill
526
+ // server-side even on aborted-mid-flight calls).
527
+ iterDispatched = true;
480
528
  iterResult = await runAgenticIteration({
481
529
  ctx,
482
530
  resolvedModel: resolved.resolved,
@@ -502,6 +550,18 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
502
550
  if (throttleReservationId !== -1) {
503
551
  ctx.throttle.cancel(throttleReservationId);
504
552
  }
553
+ // v1.14.2 Fix 4: extract Gemini's `retryInfo.retryDelay` from 429s and
554
+ // seed the throttle hint cache, mirroring `ask.tool.ts:~1063`. Pre-fix
555
+ // ask_agentic catch paths discarded the hint — TPM throttle relied on
556
+ // pure-window math which empirically over-estimates by 30s+ on real
557
+ // 429s. Gating on `isGemini429` (requires `err instanceof ApiError` +
558
+ // `err.status === 429`) is non-user-influenceable; only real Gemini
559
+ // 429s match. Future iterations / future `ask_agentic` callers honour
560
+ // the recorded hint via `throttle.reserve`'s `activeHint` lookup.
561
+ const iterRetryDelayMs = isGemini429(iterErr) ? parseRetryDelayMs(iterErr.message) : null;
562
+ if (iterRetryDelayMs !== null) {
563
+ ctx.throttle.recordRetryHint(resolved.resolved, iterRetryDelayMs);
564
+ }
505
565
  // If the iteration aborted on timeout, surface a structured TIMEOUT
506
566
  // error so the caller can distinguish "this iteration was too slow"
507
567
  // from "Gemini rejected the request". Annotate which iteration so
@@ -516,6 +576,14 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
516
576
  errorCode: 'TIMEOUT',
517
577
  timeoutMs: ms,
518
578
  iteration: iterations,
579
+ iterations,
580
+ // H2 fix: distinguish timeout-during-throttle-wait (no
581
+ // dispatch) from timeout-during-generateContent (dispatch
582
+ // happened). `iterDispatched` is set true just before the
583
+ // runAgenticIteration await — if it's still false, the timeout
584
+ // fired during abortableSleep and this iter never reached the
585
+ // API. Subtract 1 in that case to keep apiCalls authoritative.
586
+ apiCalls: iterDispatched ? iterations : Math.max(0, iterations - 1),
519
587
  retryable: true,
520
588
  });
521
589
  }
@@ -557,6 +625,7 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
557
625
  cumulativeInputTokens += iterResult.usage.promptTokenCount;
558
626
  cumulativeOutputTokens += iterResult.usage.candidatesTokenCount;
559
627
  cumulativeThinkingTokens += iterResult.usage.thoughtsTokenCount;
628
+ lastIterationPromptTokens = iterResult.usage.promptTokenCount;
560
629
  emitter.emit(`iter ${iterations}/${maxIterations}: ${iterResult.functionCallCount} tool calls, ${cumulativeInputTokens} in-tokens so far`);
561
630
  // Final-text first, budget second: if the iteration produced an
562
631
  // answer, return it even if the cumulative-token count ticked over
@@ -573,6 +642,9 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
573
642
  modelCategory: resolved.category,
574
643
  contextWindow: resolved.inputTokenLimit,
575
644
  iterations,
645
+ // Organic final-text path: no forced-finalization pass ran, so
646
+ // total `generateContent` calls equals loop iterations.
647
+ apiCalls: iterations,
576
648
  cumulativeInputTokens,
577
649
  cumulativeOutputTokens,
578
650
  cumulativeThinkingTokens,
@@ -592,6 +664,9 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
592
664
  retryable: false,
593
665
  subReason: 'AGENTIC_INPUT_BUDGET_EXCEEDED',
594
666
  iterations,
667
+ // Budget guard fires AFTER the iteration's generateContent
668
+ // completed — the call IS counted in apiCalls.
669
+ apiCalls: iterations,
595
670
  cumulativeInputTokens,
596
671
  });
597
672
  }
@@ -608,6 +683,9 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
608
683
  retryable: false,
609
684
  subReason: 'AGENTIC_NO_PROGRESS',
610
685
  iterations,
686
+ // Dedupe fires AFTER the iteration's generateContent completed —
687
+ // the call IS counted in apiCalls.
688
+ apiCalls: iterations,
611
689
  repeatedSignature: sig.slice(0, 500),
612
690
  cumulativeInputTokens,
613
691
  filesRead: filesReadSet.size,
@@ -615,19 +693,293 @@ async function executeAskAgenticBody(input, ctx, rawWorkspaceRoot, model, starte
615
693
  }
616
694
  }
617
695
  }
618
- return errorResult(`ask_agentic: reached maxIterations (${maxIterations}) without a final answer. Increase maxIterations or narrow your prompt.`, {
696
+ // Loop exhausted maxIterations without an organic final-text turn.
697
+ // Run a single forced-finalization pass — `generateContent` with
698
+ // `toolConfig.functionCallingConfig.mode = NONE` so the model is
699
+ // prohibited from emitting more function calls (Gemini API spec: NONE
700
+ // = "equivalent to sending a request without any function declarations")
701
+ // and must answer in text using the conversation it has already
702
+ // accumulated. Converts what was previously an opaque error into a
703
+ // synthesized text answer derived from the tool responses gathered so
704
+ // far. If the forced call itself fails (timeout, network, budget
705
+ // exhausted, empty text), fall through to the original error so the
706
+ // caller still gets a structured failure signal.
707
+ emitter.emit(`maxIterations (${maxIterations}) reached — running forced-finalization pass`);
708
+ // v1.14.2: the rescue pass is NOT gated on `maxTotalInputTokens`. It is
709
+ // the documented exit path for "loop ran out of iterations without final
710
+ // text" and blocking it on rescue's own potential overshoot defeats the
711
+ // v1.14.1 feature — an operator running near the cap would never get the
712
+ // synthesised answer the rescue is designed to produce. Empirical repro:
713
+ // the v1.14.1 PR self-review benchmark hit `cumulativeInputTokens=500_919
714
+ // > 500_000` cap mid-loop (the line-790 hard-stop guard, which stays);
715
+ // operators hitting maxIters near the cap saw the same self-block via the
716
+ // pre-v1.14.2 token-budget guard previously here. Rescue cost remains
717
+ // bounded by `dailyBudgetUsd` reservation (line ~892), wall-clock by
718
+ // `iterationTimeoutMs` (line ~919). Cap-overshoot is signalled via
719
+ // `overBudget: true` on the result so callers can detect the trade.
720
+ let finalizationText = '';
721
+ let finalizationUsage = {
722
+ promptTokenCount: 0,
723
+ candidatesTokenCount: 0,
724
+ thoughtsTokenCount: 0,
725
+ };
726
+ let finalizationThinkingSummary = null;
727
+ let finalizationReservationId = null;
728
+ // Tracks whether the finalization `generateContent` call was actually
729
+ // dispatched (regardless of outcome). Used by `apiCalls` accounting so
730
+ // mid-flight timeouts / pre-response network failures still count the
731
+ // attempt — `finalizationUsage.promptTokenCount` would stay at 0 in those
732
+ // cases (response never arrived to populate usageMetadata) and
733
+ // inferring "fired" from usage would undercount the API call.
734
+ let finalizationAttempted = false;
735
+ // v1.14.2 Fix 5: tracks WHY the rescue pass was skipped, so the trailing
736
+ // errorResult can emit a cause-specific message + structured field instead
737
+ // of the misleading generic "Increase maxIterations or narrow your prompt"
738
+ // (active lie when the cause is daily budget exhaustion). Set to
739
+ // 'daily-budget' when `reserveBudget` rejects below; remains null on
740
+ // success or when no rescue was attempted at all (e.g. dailyBudgetEnforced
741
+ // = false). Surfaces as `finalizationSkipReason` on `structuredContent` —
742
+ // additive optional field, no schema break for existing callers.
743
+ let finalizationSkipReason = null;
744
+ // v1.14.2: dynamic estimate for the rescue pass — replaces the static
745
+ // `PER_ITERATION_INPUT_TOKENS = 50_000` baseline with the actual size of
746
+ // the last observed iteration (+5k margin for SYSTEM_INSTRUCTION_FINALIZATION
747
+ // + thinking-config overhead). Used by BOTH the daily-budget reservation
748
+ // (immediately below) AND the TPM-throttle reservation (line ~919) so cost
749
+ // and rate-limit gates stay symmetric — pre-Fix-6.1 only the TPM reserve was
750
+ // dynamic, leaving the daily-budget gate to under-estimate rescue cost
751
+ // (broke the documented "daily budget is a true upper bound" guarantee).
752
+ // Fallback to the static estimate when the loop produced no usage record
753
+ // (defensive — in practice rescue is gated on `iterations >= maxIterations`
754
+ // so iter 1+ ran and lastIterationPromptTokens was populated).
755
+ const finalizationEstimate = lastIterationPromptTokens > 0
756
+ ? lastIterationPromptTokens + 5_000
757
+ : PER_ITERATION_INPUT_TOKENS;
758
+ const finalizationCostUsd = estimateCostUsd({
759
+ model: resolved.resolved,
760
+ uncachedInputTokens: finalizationEstimate,
761
+ cachedInputTokens: 0,
762
+ outputTokens: PER_ITERATION_OUTPUT_TOKENS,
763
+ thinkingTokens: PER_ITERATION_OUTPUT_TOKENS,
764
+ });
765
+ if (dailyBudgetEnforced) {
766
+ const reserve = ctx.manifest.reserveBudget({
767
+ workspaceRoot,
768
+ toolName: 'ask_agentic',
769
+ model: resolved.resolved,
770
+ estimatedCostMicros: toMicrosUsd(finalizationCostUsd),
771
+ dailyBudgetMicros: toMicrosUsd(ctx.config.dailyBudgetUsd),
772
+ nowMs: Date.now(),
773
+ });
774
+ if ('rejected' in reserve) {
775
+ emitter.emit(`skipping forced-finalization pass — daily budget cap reached (spent $${(reserve.spentMicros / 1_000_000).toFixed(4)})`);
776
+ logger.warn(`ask_agentic: skipping forced-finalization pass — daily budget cap reached (spent $${(reserve.spentMicros / 1_000_000).toFixed(4)})`);
777
+ finalizationSkipReason = 'daily-budget';
778
+ }
779
+ else {
780
+ finalizationReservationId = reserve.id;
781
+ }
782
+ }
783
+ if (finalizationReservationId !== null || !dailyBudgetEnforced) {
784
+ emitter.emit('running forced-finalization pass (tools disabled)');
785
+ const finalizationTimeout = createTimeoutController({
786
+ ...(input.iterationTimeoutMs !== undefined ? { totalMs: input.iterationTimeoutMs } : {}),
787
+ totalEnvVar: 'GEMINI_CODE_CONTEXT_AGENTIC_ITERATION_TIMEOUT_MS',
788
+ stallEnvVar: '',
789
+ });
790
+ let finalizationThrottleId = -1;
791
+ const finalizationStarted = Date.now();
792
+ try {
793
+ if (tpmEnforced) {
794
+ // v1.14.2: use the dynamic `finalizationEstimate` (computed above the
795
+ // daily-budget reserve block — same value, same +5k margin rationale)
796
+ // for the TPM-throttle reservation. Symmetric with the daily-budget
797
+ // reserve so rate-limit and cost gates use the SAME size estimate for
798
+ // the rescue pass. TPM over-reserve = transient throttle wait
799
+ // (harmless); under-reserve = 429 risk; bias is intentional.
800
+ const reservation = ctx.throttle.reserve(resolved.resolved, finalizationEstimate);
801
+ finalizationThrottleId = reservation.releaseId;
802
+ if (reservation.delayMs > 0) {
803
+ emitter.emit(`finalization throttle: waiting ${Math.ceil(reservation.delayMs / 1000)}s for TPM window…`);
804
+ await abortableSleep(reservation.delayMs, finalizationTimeout.signal);
805
+ }
806
+ }
807
+ // G2 fix: omit `tools` (function declarations) from the finalization
808
+ // call. Per Gemini API spec, `mode: NONE` is "equivalent to sending
809
+ // a request without any function declarations" — sending the
810
+ // declarations alongside NONE wastes ~150-300 input tokens and
811
+ // contradicts the spec we depend on. The destructure below is the
812
+ // TS-safe way to OMIT a property from the spread (assignment to
813
+ // `undefined` trips `exactOptionalPropertyTypes`).
814
+ const { tools: _unusedTools, ...baseConfigNoTools } = baseConfig;
815
+ // Mark the API attempt BEFORE dispatch so timeouts / pre-response
816
+ // network failures still count toward `apiCalls`. Set inside the try
817
+ // (after throttle wait) so a throttle-wait abort doesn't mis-count.
818
+ finalizationAttempted = true;
819
+ const response = await withNetworkRetry(() => ctx.client.models.generateContent({
820
+ model: resolved.resolved,
821
+ contents: conversation,
822
+ config: {
823
+ ...baseConfigNoTools,
824
+ systemInstruction: SYSTEM_INSTRUCTION_FINALIZATION,
825
+ toolConfig: {
826
+ functionCallingConfig: { mode: FunctionCallingConfigMode.NONE },
827
+ },
828
+ abortSignal: finalizationTimeout.signal,
829
+ },
830
+ }), {
831
+ signal: finalizationTimeout.signal,
832
+ onRetry: (attempt, retryErr) => {
833
+ logger.warn(`ask_agentic finalization: retry attempt ${attempt}: ${retryErr instanceof Error ? retryErr.message : String(retryErr)}`);
834
+ },
835
+ });
836
+ const usage = response.usageMetadata;
837
+ finalizationUsage = {
838
+ promptTokenCount: typeof usage?.promptTokenCount === 'number' ? usage.promptTokenCount : 0,
839
+ candidatesTokenCount: typeof usage?.candidatesTokenCount === 'number' ? usage.candidatesTokenCount : 0,
840
+ thoughtsTokenCount: typeof usage?.thoughtsTokenCount === 'number' ? usage.thoughtsTokenCount : 0,
841
+ };
842
+ const parts = response.candidates?.[0]?.content?.parts ?? [];
843
+ finalizationText = (response.text ?? parts.map((p) => p.text ?? '').join('')).trim();
844
+ const thoughtTexts = parts
845
+ .filter((p) => p.thought === true && typeof p.text === 'string')
846
+ .map((p) => p.text);
847
+ finalizationThinkingSummary =
848
+ thoughtTexts.length > 0 ? thoughtTexts.join('\n').slice(0, 1200) : null;
849
+ if (finalizationReservationId !== null) {
850
+ const actualCost = estimateCostUsd({
851
+ model: resolved.resolved,
852
+ uncachedInputTokens: finalizationUsage.promptTokenCount,
853
+ cachedInputTokens: 0,
854
+ outputTokens: finalizationUsage.candidatesTokenCount,
855
+ thinkingTokens: finalizationUsage.thoughtsTokenCount,
856
+ });
857
+ try {
858
+ ctx.manifest.finalizeBudgetReservation(finalizationReservationId, {
859
+ cachedTokens: 0,
860
+ uncachedTokens: finalizationUsage.promptTokenCount,
861
+ costUsdMicro: toMicrosUsd(actualCost),
862
+ durationMs: Date.now() - finalizationStarted,
863
+ });
864
+ }
865
+ catch (finalizeErr) {
866
+ logger.error(`ask_agentic finalization: finalize reservation failed: ${safeForLog(finalizeErr)}`);
867
+ }
868
+ }
869
+ if (finalizationThrottleId !== -1) {
870
+ ctx.throttle.release(finalizationThrottleId, finalizationUsage.promptTokenCount);
871
+ }
872
+ }
873
+ catch (finalErr) {
874
+ if (finalizationReservationId !== null) {
875
+ try {
876
+ ctx.manifest.cancelBudgetReservation(finalizationReservationId);
877
+ }
878
+ catch (cancelErr) {
879
+ logger.error(`ask_agentic finalization: cancelBudgetReservation failed: ${safeForLog(cancelErr)}`);
880
+ }
881
+ }
882
+ if (finalizationThrottleId !== -1) {
883
+ ctx.throttle.cancel(finalizationThrottleId);
884
+ }
885
+ // v1.14.2 Fix 4: same retry-hint extraction as the per-iteration catch
886
+ // — the rescue's generateContent can also 429, and the hint should
887
+ // seed the throttle cache for future ask_agentic / ask / code calls.
888
+ const finalRetryDelayMs = isGemini429(finalErr)
889
+ ? parseRetryDelayMs(finalErr.message)
890
+ : null;
891
+ if (finalRetryDelayMs !== null) {
892
+ ctx.throttle.recordRetryHint(resolved.resolved, finalRetryDelayMs);
893
+ }
894
+ // Best-effort: log and fall through to errorResult. The caller
895
+ // already burned the iteration budget and deserves a structured
896
+ // failure rather than a re-thrown SDK error.
897
+ if (isTimeoutAbort(finalErr)) {
898
+ logger.warn('ask_agentic finalization: timed out after maxIterations exhaustion');
899
+ }
900
+ else {
901
+ logger.warn(`ask_agentic finalization: pass failed: ${finalErr instanceof Error ? finalErr.message : String(finalErr)}`);
902
+ }
903
+ }
904
+ finally {
905
+ finalizationTimeout.dispose();
906
+ }
907
+ }
908
+ // Token totals after the finalization pass. When the pass succeeded at
909
+ // the API level its tokens ARE billed even if `finalizationText` came
910
+ // back empty, so both branches below report the post-pass totals — this
911
+ // closes the structured-telemetry drift where the empty-text fallback
912
+ // previously under-reported real usage.
913
+ const totalCumulativeInputTokens = cumulativeInputTokens + finalizationUsage.promptTokenCount;
914
+ const totalCumulativeOutputTokens = cumulativeOutputTokens + finalizationUsage.candidatesTokenCount;
915
+ // `apiCalls` = total generateContent calls. Track from the explicit
916
+ // `finalizationAttempted` flag (set IMMEDIATELY BEFORE the
917
+ // `await withNetworkRetry(...)` dispatch) rather than inferring from
918
+ // `finalizationUsage.promptTokenCount > 0` — timeouts and pre-response
919
+ // network failures leave usageMetadata empty even though the API attempt
920
+ // happened (and may have been billed server-side). Skipped paths
921
+ // (daily-budget reject, token-cap overshoot) leave `finalizationAttempted`
922
+ // false so they correctly report `apiCalls = iterations`. Operators can
923
+ // branch on `apiCalls > iterations` to detect the forced pass without
924
+ // parsing `convergenceForced`. (Round-4 Copilot fix.)
925
+ const apiCalls = iterations + (finalizationAttempted ? 1 : 0);
926
+ if (finalizationText.length > 0) {
927
+ return textResult(finalizationText, {
928
+ resolvedModel: resolved.resolved,
929
+ requestedModel: resolved.requested,
930
+ fallbackApplied: resolved.fallbackApplied,
931
+ modelCategory: resolved.category,
932
+ contextWindow: resolved.inputTokenLimit,
933
+ iterations,
934
+ apiCalls,
935
+ cumulativeInputTokens: totalCumulativeInputTokens,
936
+ cumulativeOutputTokens: totalCumulativeOutputTokens,
937
+ cumulativeThinkingTokens: cumulativeThinkingTokens + finalizationUsage.thoughtsTokenCount,
938
+ filesRead: filesReadSet.size,
939
+ filesReadList: [...filesReadSet].slice(0, 40),
940
+ durationMs: Date.now() - started,
941
+ thinkingSummary: finalizationThinkingSummary,
942
+ convergenceForced: true,
943
+ // Mirror the organic-final-text path (line ~754) so callers can
944
+ // detect when the pass pushed cumulative tokens past the cap.
945
+ overBudget: totalCumulativeInputTokens > maxTotalInputTokens,
946
+ });
947
+ }
948
+ // v1.14.2 Fix 5: branch the error message on whether the rescue was
949
+ // skipped due to daily-budget exhaustion vs ran-and-failed (empty text /
950
+ // network error / timeout). Pre-fix the generic "Increase maxIterations"
951
+ // message lied to operators on the daily-budget skip path — the actual
952
+ // remediation is to wait for daily reset or raise GEMINI_DAILY_BUDGET_USD.
953
+ // The structured field `finalizationSkipReason` is additive (only present
954
+ // when set) so existing callers ignore it; new callers can branch on it
955
+ // for automated triage.
956
+ const errorMessage = finalizationSkipReason === 'daily-budget'
957
+ ? `ask_agentic: reached maxIterations (${maxIterations}) without a final answer; forced-finalization pass skipped because daily budget cap reached. Wait for daily reset (UTC midnight) or raise GEMINI_DAILY_BUDGET_USD.`
958
+ : `ask_agentic: reached maxIterations (${maxIterations}) without a final answer. Increase maxIterations or narrow your prompt.`;
959
+ return errorResult(errorMessage, {
619
960
  errorCode: 'UNKNOWN',
620
961
  retryable: false,
621
962
  subReason: 'AGENTIC_MAX_ITERATIONS',
963
+ ...(finalizationSkipReason !== null ? { finalizationSkipReason } : {}),
622
964
  iterations,
623
- cumulativeInputTokens,
624
- cumulativeOutputTokens,
965
+ apiCalls,
966
+ cumulativeInputTokens: totalCumulativeInputTokens,
967
+ cumulativeOutputTokens: totalCumulativeOutputTokens,
625
968
  filesRead: filesReadSet.size,
626
969
  });
627
970
  }
628
971
  catch (err) {
629
972
  logger.error(`ask_agentic failed: ${safeForLog(err)}`);
630
973
  const httpStatus = err.status;
974
+ // v1.14.2 Fix 4 (round-2 verdict from Phase 4 /coderev — Grok P1):
975
+ // outer-catch hint extraction is structurally infeasible — `resolved` is
976
+ // scoped to the inner try block, not visible here. Hoisting `resolved`
977
+ // out of the try would widen the change beyond Fix 4's scope. Net real-
978
+ // world impact is bounded: the iter catch already extracts hints for all
979
+ // generateContent 429s (the load-bearing 429 surface); the only escape
980
+ // path is a `resolveModel.list()` 429 during model resolution (rare —
981
+ // happens only on the very first call after API-key rotation or quota
982
+ // reset). Tracked as v1.14.3 followup in `.claude/local-v1.14.2-6step.md`.
631
983
  return errorResult(`ask_agentic failed: ${err instanceof Error ? err.message : String(err)}`, {
632
984
  errorCode: 'UNKNOWN',
633
985
  retryable: false,
@@ -1 +1 @@
1
- {"version":3,"file":"ask-agentic.tool.js","sourceRoot":"","sources":["../../src/tools/ask-agentic.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAoB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,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14.0",
3
+ "version": "1.14.2",
4
4
  "mcpName": "io.github.qmediat/gemini-code-context-mcp",
5
5
  "description": "MCP server that gives Claude Code persistent memory of your codebase, backed by Gemini's 2M-token context. Includes eager `ask`/`code` for cached repo Q&A and `ask_agentic` for agentic file access on repos that exceed the model's input-token limit.",
6
6
  "keywords": [