continue icon indicating copy to clipboard operation
continue copied to clipboard

Continue not making changes to code

Open tylerjborg opened this issue 1 year ago • 22 comments

I can make certain changes to the code file, but if I ask Continue to make edits to blocks of code it tries but doesn't succeed. It was working just fine yesterday.

tylerjborg avatar Aug 14 '25 06:08 tylerjborg

It seems you need to provide more information. A video, for example

vldF avatar Aug 14 '25 09:08 vldF

I supposedly have the same problem, it never worked though but I am also using continue in combination with VSCode for 2 weeks.

My continue chat is connected to a local LLM in LMStudio. The chat works, the agent (I am using agent mode) can see files and proposes edits to them. When I click "accept" on one of these proposed file changes, the file opens in VSCode, flashes once, but no changes are made to the file. When prompting further, the assistant can see that it didn't change anything, but also fails in the following trials.

I am on Visual Studio Code Version: 1.103.0 (Universal) and have also tested some lower versions. Continue was tested on 1.0.22 as well as the current pre-release

jpheuz avatar Aug 14 '25 11:08 jpheuz

I have same issue when using qwen3:14b locally(Ollama) in Agent Mode and try to apply changes on the files that it suggested, but no changes make. In same time creating new file is working as indeed.

Software: Continue: 1.2.0 VS Code: 1.103.2 Ollama: latest

Hardware: CPU: AMD Ryzen 7 7800X3D RAM: 48Gb GPU: NVIDIA 4070 Ti Super 16Gb

config.yml

name: Local Assistant
version: 1.0.0
schema: v1
models:
  - name: Nomic Embed
    provider: ollama
    model: nomic-embed-text:latest
    roles:
      - embed
  - name: Autodetect
    provider: ollama
    model: AUTODETECT
context:
  - provider: code
  - provider: docs
  - provider: diff
  - provider: terminal
  - provider: problems
  - provider: folder
  - provider: codebase

pavel-cursor avatar Aug 27 '25 15:08 pavel-cursor

Same Issue here, sometimes edit works but most of the time it doesn't even though the llm says "I successfully added these lines to the file"

Image Image

lainwir3d avatar Oct 07 '25 13:10 lainwir3d

I'm still seeing this in v 1.2.10 when using the recommended model gpt-oss:20b:

Sometimes it says the edits were completed when they weren't and sometimes it shows "❌ Agent tool use":

Image
Error parsing Ollama response: Error: error parsing tool call: raw='from pathlib import Path, Path ', err=invalid character 'r' in literal false (expecting 'a') {"error":"error parsing tool call: raw='from pathlib import Path, Path\n', err=invalid character 'r' in literal false (expecting 'a')"}

meichthys avatar Nov 18 '25 16:11 meichthys

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Feb 17 '26 02:02 github-actions[bot]

this is driving me crazy. I would think that applying edits to the current file would be fundamental feature in this extension. instead, it just generates code and expects me to paste it in. now, I'm had long conversations with Gemini about this, and it says like 1) be careful about makign sure the model has apply in the config, and that is is a model that can handle applys. it suggests deepseek-coder-v2. Also, you are supposed to use Chat mode, not agent mode. But I would really like some clarity from the team about exactly what setup is required to get apply to work! I'm tired of copy/pasting. Github Copilot does this seamlessly. We just need to know the exact config to make it work.

greaterthanstar avatar Feb 18 '26 21:02 greaterthanstar

I can attest that a reliable apply would be really helpful. We see the same with our custom endpoint

VeraKowalczuk avatar Mar 12 '26 09:03 VeraKowalczuk

I found the root cause for my “Continue tries to edit but does not apply changes” case.

Environment

  • Continue: 1.2.17
  • VS Code over Remote SSH
  • Model config:
    • provider: openai
    • model: **name**
    • apiBase: **url**

What happens

Continue starts applyToFile, but edits fail repeatedly with no file changes.

Root cause (from logs)

The failure is not file permissions.
Continue is attempting streaming via legacy completions endpoint:

  • HTTP 400 Bad Request from **url**
  • {"detail":"Streaming is not supported for /v1/completions yet."}
  • followed by:
    • Error streaming edit diffs
    • Error handling webview message: applyToFile

So edit/apply fails before patching because the backend rejects streaming on /v1/completions.

Workaround that fixes it

In ~/.continue/config.yaml (or Windows Continue config), set:

models:
  - name: Qwen Local (OpenAI API)
    provider: openai
    model: **name**
    apiBase: "url"
    apiKey: ${SARA_API_KEY}
    roles: [chat, edit, apply]
    useLegacyCompletionsEndpoint: false
    completionOptions:
      stream: false

michaelradhuber avatar Mar 19 '26 12:03 michaelradhuber

Does any fix it?

mainguyenanhvu avatar Mar 20 '26 03:03 mainguyenanhvu

@michaelradhuber Does your workaround enforce that /v1/completions is never used for edit/apply? Or does Continue still use the legacy endpoint there but you fix it by disabling streaming completely?

VeraKowalczuk avatar Mar 23 '26 17:03 VeraKowalczuk

I am having this same issue, it trys to create/edit files/folders it just fails, it works 50/50 of the time

VirtualMediaGroup avatar Apr 20 '26 10:04 VirtualMediaGroup

I noticed that the response of my Apply model is the complete file with all changes applied. I assume that is what is needed. But the diff in the editor changes something completely different than both the diff in the chat or the response (as seen in the Continue Console). Sometimes half the file is just deleted.

VKatWork avatar Apr 21 '26 14:04 VKatWork

We have observed that this problem occurs more frequently when editing Markdown files. For example, applying changes to Readmes with code blocks is impossible because the shown Diff deletes half the original file content even though the proposed change in the chat is correct. This even happens with the workaround proposed by @michaelradhuber. I assume the diff parsing gets broken by the ``` code fences. Are there any updates or tipps what to do differently?

VKatWork avatar May 05 '26 08:05 VKatWork

I would like to move to LM Studio, Copilot doesnt support it yet, only ollama. Continue has the same issues you describe with LM studio as well.

Image Image

" failed because the arguments were invalid, with the following message: Tool not found

Please try something else or request further instructions."

I am using Gemma e4b q8 trained for tool use, 13691 token context. Then I tried a bigger model like qwen 3.6 30b if haluzination about the tool names is an issue, but same errors, not able to edit files. I have to manually press insert the proposed changes whether in code or in markdown text, then the tool gets marked as successful edit..

Image

BenedictLang avatar May 16 '26 10:05 BenedictLang

I found the root cause for my “Continue tries to edit but does not apply changes” case.

Environment

* Continue: `1.2.17`

* VS Code over Remote SSH

* Model config:
  
  * `provider: openai`
  * `model: **name**`
  * `apiBase: **url**`

What happens

Continue starts applyToFile, but edits fail repeatedly with no file changes.

Root cause (from logs)

The failure is not file permissions. Continue is attempting streaming via legacy completions endpoint:

* `HTTP 400 Bad Request from **url**`

* `{"detail":"Streaming is not supported for /v1/completions yet."}`

* followed by:
  
  * `Error streaming edit diffs`
  * `Error handling webview message: applyToFile`

So edit/apply fails before patching because the backend rejects streaming on /v1/completions.

Workaround that fixes it

In ~/.continue/config.yaml (or Windows Continue config), set:

models:

  • name: Qwen Local (OpenAI API) provider: openai model: name apiBase: "url" apiKey: ${SARA_API_KEY} roles: [chat, edit, apply] useLegacyCompletionsEndpoint: false completionOptions: stream: false

This worked for me :+1

nilchia avatar Jun 10 '26 09:06 nilchia

@nilchia Can you do edits on Markdown files with code blocks in them, e.g. readmes?

VKatWork avatar Jun 10 '26 15:06 VKatWork

@nilchia Can you do edits on Markdown files with code blocks in them, e.g. readmes?

@VKatWork, yes!

nilchia avatar Jun 12 '26 09:06 nilchia

I found a workaround for editing files, by enabling the setting "Only use system message tools" in the Experimental section. This is my config:

  • name: Local - Qwen3-Coder 30B provider: ollama apiBase: http://localhost:11434 model: qwen3-coder:30b contextLength: 32768 capabilities: - tool_use roles: - chat - edit - apply

When creating an app from scratch, this setting must be disabled. Once the files have been created, enable the setting again so the files can be edited in subsequent prompts.

nkarmelk64 avatar Jul 22 '26 16:07 nkarmelk64

  • capabilities:
    • tool_use roles:
    • chat
    • edit
    • apply

This fixed my issue

Haxzed avatar Jul 25 '26 05:07 Haxzed