continuedev / continuedev/continue
Ollama tool calls are dropped when streaming delta has no id
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Before submitting your bug report
- I've tried finding an answer on the Continue docs site
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 11
- Continue CLI: @continuedev/cli@1.5.47
- Model: gpt-oss:20b
- Provider: Ollama
- Model context: 65,536
- Agent capabilities: tool_use
Description
Continue CLI 1.5.47 drops Ollama streaming tool calls when the first tool-call delta contains an index but no id.
With gpt-oss:20b, Ollama returns valid structured tool_calls directly through its API. However, Continue's processToolCallDelta() drops the tool call when there is no id and no existing index-to-ID mapping.
The result is that tool arguments appear as plain assistant content:
{"filepath":"convex/schema.ts"}
The tool is never executed and the agent turn ends without a final response. Typing "continue" manually allows the agent to resume.
I verified the issue by patching processToolCallDelta() to generate a stable call_ ID when id is absent. This fixes the tool-call handling.
I verified the issue by patching processToolCallDelta() to generate a stable call_ ID when id is absent. This fixes the tool-call handling.
I found related Ollama/tool-calling issues, including #10711, but none describing this specific missing-ID/index-mapping failure.
To reproduce
- Configure Continue CLI 1.5.47 to use gpt-oss:20b through Ollama with tool use enabled.
- Start cn in a repository.
- Give the agent a task requiring multiple tool calls.
- After several successful tool calls, an Ollama tool-call delta is received with an index but no id.
- Continue drops the tool call.
- The tool arguments appear as plain assistant content, for example: {"filepath":"convex/schema.ts"}
- The agent stops without executing the tool.
- Entering "continue" allows the task to resume.
The same model was tested directly against the Ollama API with multiple sequential tool calls, and the API returned correctly structured tool_calls each time.
Log output
The Continue session successfully executed 13 tool calls before the failure.
The final assistant message contained:
{"filepath":"convex/schema.ts"}
but had no toolCalls or toolCallStates entry. Therefore Read(convex/schema.ts) was never dispatched.
The relevant Continue source is processToolCallDelta() in the CLI bundle:
if(e.id?(r=e.id,e.index!==void 0&&r&&n.set(e.index,r)):e.index!==void 0&&(r=n.get(e.index)),!r){
xe.warn("Tool call delta without ID or valid index mapping",{toolCallDelta:e});
return;
}
When the first Ollama delta has index but no id, n.get(e.index) returns undefined and the tool call is dropped.
A local patch that generates a stable call_<index> ID and stores it in the index-to-ID map fixes the issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with processToolCallDelta() in the Continue CLI bundle and trace how streaming deltas map indexes to tool-call IDs. Reproduce with Ollama and gpt-oss:20b using the steps in the issue, then verify that a delta with an index but no id is retained, its arguments are dispatched as a tool call, and the agent produces a final response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ollama, typescript
- Domain
- ai, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 73/100