opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Ollama (qwen2.5-coder): tool calls (edit/write) show as executed but no files are created/modified

Open danielveraec opened this issue 1 month ago • 5 comments

Description

When using OpenCode with Ollama + qwen2.5-coder, tool calls such as edit / write appear to execute (the JSON tool payload is printed in the output), but no files are actually created or modified on disk.

This affects both /init (which does not create AGENTS.md) and any manual request to create or edit files. Manual file creation using the shell works, confirming the directory is writable. The issue reproduces consistently across sessions and directories.

It appears that tool calls are generated by the model, but are not applied to the filesystem.

Plugins

No response

OpenCode version

1.1.3

Steps to reproduce

  1. cd into a writable directory (verified with touch test.txt)
  2. Start OpenCode from that directory: opencode
  3. Ask OpenCode to create a file, for example: "Create a file named prueba.txt"
  4. Alternatively, run: /init
  5. OpenCode prints a tool call (edit / write), but no file is created on disk.

Screenshot and/or share link

Image

Operating System

macOS 26.2 (Tahoe)

Terminal

macOS Terminal (zsh)

danielveraec avatar Jan 06 '26 04:01 danielveraec

This issue might be a duplicate of existing issues. Please check:

  • #6918: qwen3-coder fails to call edit tool - Similar tool call failures with Qwen models
  • #7002: Regression in 1.1.3 - Also in v1.1.3 with tool execution errors where tools are called but parameters are invalid/undefined
  • #6838: Tool.edit should receive json object - Related to tool parameter handling issues

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Jan 06 '26 04:01 github-actions[bot]

Is this w/ ollama?

rekram1-node avatar Jan 06 '26 04:01 rekram1-node

Is this w/ ollama?

Yes. This is using Ollama (local) with qwen2.5-coder via the OpenAI-compatible endpoint (http://127.0.0.1:11434/v1). The issue reproduces consistently when using Ollama as the provider.

danielveraec avatar Jan 06 '26 04:01 danielveraec

Did u set num_ctx (see docs)

Ill try to do a pass on ollama soon but rn u need to configure that cause ollama by default has such a low context limit that agentic stuff will hardly work

rekram1-node avatar Jan 06 '26 04:01 rekram1-node

Same problem. Increasing the context size in the Ollama settings appears to solve the issue:

Image

UPD. Sorry for misleading. Worked once, but can't make it to work since

GlenM42 avatar Jan 06 '26 05:01 GlenM42