Files
g3/crates/g3-core
Dhanji R. Prasanna 68f8f13b38 Fix research_status polling tool falsely deduplicated across auto-continue iterations
The dedup logic compared only tool name+args, ignoring the unique tool call
IDs that native providers (Anthropic) assign to each invocation. When the
model called research_status {} in iteration 1, auto-continued, and called
it again in iteration 2 with identical args but a new ID, the second call
was marked DUP IN MSG and skipped. With no tool executed and no text, the
stream errored with 'No response received from the model.'

Three-part fix:
- ID-aware DUP IN MSG: check_duplicate_in_previous_message() uses tool call
  IDs when both are non-empty (different IDs = different invocations)
- History cutoff: only checks messages from before the current iteration to
  prevent within-iteration false positives
- DUP IN ITER: last_executed_tool on IterationState catches stuttered
  duplicates across chunks within the same response

Regression test reproduces the exact bug (fails without fix, passes with).
2026-02-12 15:54:24 +11:00
..