Copilot Chat agent mode: no identical-tool-call repetition detection; "Continue to iterate?" auto-extends budget so loops run 12-18+ rounds unattended
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
**Environment:** VS Code 1.138.0 (commit 7debcd0e2acdea1c52de81bf9ee1620444407dda), builtin Copilot Chat 0.66.0, macOS 27.2 (arm64). Models: z-ai/glm-5.3-flash and moonshotai/kimi-k3 via OpenRouter BYOK — model-agnostic.
**Description:** In Copilot Chat agent mode, when a model re-issues an identical tool call (same tool, same arguments), the harness executes it every time with no repetition detection, no warning, and no circuit breaker. When the per-response request budget is exhausted, the "Continue to iterate?" prompt extends it, so an unattended session loops until the user notices. Three verified instances on 2026-09-17/18:
1. `find_tools` (MCP tool discovery) called 12 times in a row with identical arguments.
2. `gh run view 35303632186` (terminal tool, no MCP involved) executed 18 times in one session.
3. `commons_create` (MCP write tool) called 14 times with the same payload — a *write* loop, only saved from duplicates by server-side idempotency keys.
The same models and MCP servers under Claude Code and Codex harnesses do not exhibit this — those harnesses surface identical-call repetition to the model or block it.
**Expected behavior:** the harness should detect N (e.g. 2-3) consecutive identical tool calls, refuse to execute further duplicates, and surface a visible warning; "Continue to iterate?" should not silently reset the budget when the spent budget was a repetition loop.
**Actual behavior:** unlimited identical calls; budget prompt auto-extends; loops only stop at user intervention or `chat.agent.maxRequests`.
**Mitigations applied locally:** `chat.agent.maxRequests` lowered to 15; a user-level instruction file forbidding identical-call retries. Both are workarounds — the harness gap remains.
(Filed here because microsoft/vscode-copilot-release is archived/read-only.)
Contributor guide
Assessment
This issue has not been assessed yet.