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

Open
opened 2026-02-16 17:43:15 -05:00 by yindo · 8 comments
Owner

Originally created by @danielveraec on GitHub (Jan 5, 2026).

Originally assigned to: @rekram1-node on GitHub.

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)

Originally created by @danielveraec on GitHub (Jan 5, 2026). Originally assigned to: @rekram1-node on GitHub. ### 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 <img width="610" height="144" alt="Image" src="https://github.com/user-attachments/assets/00bd7c8f-5672-47cd-b661-c9a0764931ac" /> ### Operating System macOS 26.2 (Tahoe) ### Terminal macOS Terminal (zsh)
yindo added the bug label 2026-02-16 17:43:15 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 5, 2026):

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] commented on GitHub (Jan 5, 2026): 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.
Author
Owner

@rekram1-node commented on GitHub (Jan 5, 2026):

Is this w/ ollama?

@rekram1-node commented on GitHub (Jan 5, 2026): Is this w/ ollama?
Author
Owner

@danielveraec commented on GitHub (Jan 5, 2026):

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 commented on GitHub (Jan 5, 2026): > 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.
Author
Owner

@rekram1-node commented on GitHub (Jan 5, 2026):

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 commented on GitHub (Jan 5, 2026): 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
Author
Owner

@GlenM42 commented on GitHub (Jan 6, 2026):

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 commented on GitHub (Jan 6, 2026): Same problem. Increasing the context size in the Ollama settings appears to solve the issue: <img width="983" height="806" alt="Image" src="https://github.com/user-attachments/assets/e11a29c1-5d45-43ab-bcc5-55b4492a418b" /> UPD. Sorry for misleading. Worked once, but can't make it to work since
Author
Owner

@dwhacks commented on GitHub (Jan 29, 2026):

Even making qwen2.5-coder have a 20k or more context length it doesnt seem to be able to actually create/edit files:

create a python script that will convert user input text into sha-256 checksum

echo -n "Enter the text to convert: "
read text
echo -ne "$text" | openssl dgst -sha256

This script prompts the user for text input and then uses openssl to compute the SHA-256 checksum of the provided text.

It writes out the steps as if its doing it, but doesnt do it. Qwen3 will work with all the same settings.

@dwhacks commented on GitHub (Jan 29, 2026): Even making qwen2.5-coder have a 20k or more context length it doesnt seem to be able to actually create/edit files: `create a python script that will convert user input text into sha-256 checksum` `echo -n "Enter the text to convert: "` `read text` `echo -ne "$text" | openssl dgst -sha256` `This script prompts the user for text input and then uses openssl to compute the SHA-256 checksum of the provided text.` It writes out the steps as if its doing it, but doesnt do it. Qwen3 will work with all the same settings.
Author
Owner

@torgeir commented on GitHub (Feb 8, 2026):

I'm seeing the same thing.

@torgeir commented on GitHub (Feb 8, 2026): I'm seeing the same thing.
Author
Owner

@allarac commented on GitHub (Feb 13, 2026):

Ask the model what the function signature of the write tool is. It will tell you garbage like filepath followed description, while it is content followed by filepath. If you explain it, it does it correctly, keeps forgetting.

@allarac commented on GitHub (Feb 13, 2026): Ask the model what the function signature of the write tool is. It will tell you garbage like filepath followed description, while it is content followed by filepath. If you explain it, it does it correctly, keeps forgetting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4278