anomalyco / anomalyco/opencode
deepseek-v4-flash-free stops the agent loop after nearly every tool call
@kitlangton is already working on this.
Since Jul 27, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When using deepseek-v4-flash-free, the Build agent frequently stops after a single tool call, even when the model says it is about to continue. This happens after tools such as read, grep, glob, and todowrite.
Typing continue resumes the task, but it usually stops again after the next tool call. There is no steps limit configured, no permission denial, and no visible tool error. The logs show OpenCode starting the next loop step, then exiting normally because the model does not emit another tool call.
This appears to be a model or provider-adapter issue where the response ends with a terminal stop reason after a tool result instead of continuing the agent loop.
Plugins
none
OpenCode version
1.18.7
Steps to reproduce
- Open a repository in OpenCode.
- Select the
deepseek-v4-flash-freemodel and use the Build agent. - Give it a task that requires multiple tool calls, such as inspecting several files and making a change.
- Wait for it to run a tool like
read,grep,glob, ortodowrite. - Observe that the agent stops immediately after the tool result instead of continuing.
- Type
continue. - Observe that it usually performs one more tool call and stops again.
Screenshot and/or share link
https://opncd.ai/share/nxPY1oQG
Operating System
Macos 27 beta 2
Terminal
Kitty
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.
Assessment
This issue has not been assessed yet.