continuedev / continuedev/continue

Continue sends duplicate tool-result history for a reused tool-call id

Open
#12,626 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:tools kind:bug os:linux
Dominant language
TypeScript
Stars
36k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Before submitting your bug report
Relevant environment info
- OS: Linux x86_64 Docker, using `node:24-bookworm`based target image
- Continue version: `@continuedev/cli@1.5.45`
- IDE version: CLI (`cn`), no IDE
- Model: OpenAI Chat-compatible local mock provider, `gpt-4`
- config:
    
    
    name: vendor-repro
    version: 1.0.0
    models:
      - provider: openai
        model: gpt-4
        apiBase: <http://127.0.0.1>:<mock-provider-port>/v1
        apiKey: vendor-repro-fake-key
Description

Severity / performance impact: Medium to High. When the provider reuses tool-call id dup_id_0001 across turns, Continue sends duplicate tool-result entries for that id back to the provider. This can corrupt provider conversation state, trigger provider-side schema errors, or amplify retries.

To reproduce

Prerequisites: Docker, Python 3, and the GitHub CLI (gh) for the clone command below. The linked reproducer is self-contained and uses only Python standard-library modules plus Docker. It builds @continuedev/cli@1.5.45 from the public npm package, starts a local mock provider, and runs the CLI in an isolated workspace. The Docker run is limited to 2 CPUs and 4 GiB RAM by default.

Complete self-contained reproducer: https://gist.github.com/N0zoM1z0/d4d4d2732a41371dc8a0c219846c22a2

gh gist clone d4d4d2732a41371dc8a0c219846c22a2 continue-duplicate-tool-id-history-pollution-reproducer
cd continue-duplicate-tool-id-history-pollution-reproducer
python3 continue-duplicate-tool-id-history-pollution.reproduce.py

To reuse an already-built local image:

python3 continue-duplicate-tool-id-history-pollution.reproduce.py --skip-build
Log output
Expected successful reproduction output includes:


provider_requests=442
duplicate_tool_result_in_request dup_id_0001: observed=441 expected>=2
REPRODUCED

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked self-contained reproducer with the Continue CLI environment described in the issue and inspect the CLI's tool-result history handling. Trace the request construction until the reused tool-call id is serialized, then rerun the reproducer; done means repeated requests no longer contain duplicate tool-result entries for dup_id_0001.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.