Skip to content

Cline consistently referencing 'cline-diff:' problems in VSCODE #738

Open
@chunter-rr

Description

@chunter-rr

Which API Provider are you using?

OpenRouter

Which Model are you using?

Claude 3.5 Sonnet

What happened?

When adjusting code, cline is referencing problems in the "Problem Tab" in Vscode. While this is normally fine, it seems that it is using cached problems that originate from the 'cline-diff' url. Because of this, I have to usually wait a few moments for the cache to clear out. I only started seeing this recently.

This causes cline to retry fixing a file, even though it is fixed. It keeps trying over and over again. This looks like an issue within vscode. It's almost as if cline isn't clearing cached problems and continues to try to fix them.

Steps to reproduce

  1. Ask a question to cause cline to update a file.
  2. After the update is complete, problems remain in the vscode Problems tab.
  3. Cline references these remaining problems.
  4. When I try to go in and check the cached cline-diff file, the file is read-only.
  5. Cline continues to try to fix non-existent errors because of the cached file.
  6. I can temporarily fix this issue by instructing Cline to ignore any cline-diff errors; however, it'll eventually go back to trying to continuously fix the errors.

Relevant API REQUEST output

No response

Additional context

I'm currently working on a bicep project. I wanted to see if it could use the 'Microsoft.Graph' extension properly. I showed it how to implement it first. When it went to make corrections, this is what it said first:

**I see we need to fix the extension declarations and resource types. Looking at the Microsoft Graph applications reference again, I notice we need to use the correct property names and structure.**

It said this because it's referencing a cached version of problems with the file. It then tries to make corrections, but they're not right (which is fine); however, it will end up in a loop trying to continuously fix the issue because it keeps referencing a cached problem.

When I manually checked what Cline's output was in the fixed file, it had changed 'correct code' to incorrect code because it thought it's previously implementation caused vscode errors; when in fact, it was correct.

As a result I am looking at two references to the same file in the problems tab. The bottom 'aadapp.bicep' is the cached version that doesn't seem to ever go away. The top 'aadapp.bicep' is its attempt to fix correct code, obviously causing incorrect code output when it was correct in the first place:
redacted-screenshot

(Assumed) Cached problem for aadapp.bicep

[{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP203", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP203" } }, "severity": 8, "message": "Using extension declaration requires enabling EXPERIMENTAL feature \"Extensibility\".", "source": "bicep", "startLineNumber": 17, "startColumn": 1, "endLineNumber": 17, "endColumn": 18 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP028", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP028" } }, "severity": 8, "message": "Identifier \"error\" is declared multiple times. Remove or rename the duplicates.", "source": "bicep", "startLineNumber": 17, "startColumn": 11, "endLineNumber": 17, "endColumn": 18 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP203", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP203" } }, "severity": 8, "message": "Using extension declaration requires enabling EXPERIMENTAL feature \"Extensibility\".", "source": "bicep", "startLineNumber": 18, "startColumn": 1, "endLineNumber": 18, "endColumn": 20 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP028", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP028" } }, "severity": 8, "message": "Identifier \"error\" is declared multiple times. Remove or rename the duplicates.", "source": "bicep", "startLineNumber": 18, "startColumn": 11, "endLineNumber": 18, "endColumn": 20 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP029", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP029" } }, "severity": 8, "message": "The resource type is not valid. Specify a valid resource type of format \"<type-name>@<apiVersion>\".", "source": "bicep", "startLineNumber": 28, "startColumn": 17, "endLineNumber": 28, "endColumn": 52 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP029", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP029" } }, "severity": 8, "message": "The resource type is not valid. Specify a valid resource type of format \"<type-name>@<apiVersion>\".", "source": "bicep", "startLineNumber": 57, "startColumn": 30, "endLineNumber": 57, "endColumn": 70 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP062", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP062" } }, "severity": 8, "message": "The referenced declaration with name \"avdApp\" is not valid.", "source": "bicep", "startLineNumber": 72, "startColumn": 26, "endLineNumber": 72, "endColumn": 32 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP062", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP062" } }, "severity": 8, "message": "The referenced declaration with name \"avdApp\" is not valid.", "source": "bicep", "startLineNumber": 73, "startColumn": 31, "endLineNumber": 73, "endColumn": 37 },{ "resource": "aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP062", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP062" } }, "severity": 8, "message": "The referenced declaration with name \"avdServicePrincipal\" is not valid.", "source": "bicep", "startLineNumber": 74, "startColumn": 36, "endLineNumber": 74, "endColumn": 55 }]

Actual output of problems after changing correct code to incorrect code:

[{ "resource": "/home/<redacted>/Desktop/<redacted>/modules/aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP093", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP093" } }, "severity": 8, "message": "File path \"Microsoft.Graph\" could not be resolved relative to \"/home/<redacted>/Desktop/<redacted>/modules/aadapp.bicep\".", "source": "bicep", "startLineNumber": 17, "startColumn": 11, "endLineNumber": 17, "endColumn": 28 },{ "resource": "/home/<redacted>/Desktop/<redacted>/modules/aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP029", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP029" } }, "severity": 8, "message": "The resource type is not valid. Specify a valid resource type of format \"<type-name>@<apiVersion>\".", "source": "bicep", "startLineNumber": 29, "startColumn": 17, "endLineNumber": 29, "endColumn": 52 },{ "resource": "/home/<redacted>/Desktop/<redacted>/modules/aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP029", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP029" } }, "severity": 8, "message": "The resource type is not valid. Specify a valid resource type of format \"<type-name>@<apiVersion>\".", "source": "bicep", "startLineNumber": 60, "startColumn": 30, "endLineNumber": 60, "endColumn": 70 },{ "resource": "/home/<redacted>/Desktop/<redacted>/modules/aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP062", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP062" } }, "severity": 8, "message": "The referenced declaration with name \"avdApp\" is not valid.", "source": "bicep", "startLineNumber": 77, "startColumn": 26, "endLineNumber": 77, "endColumn": 32 },{ "resource": "/home/<redacted>/Desktop/<redacted>/modules/aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP062", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP062" } }, "severity": 8, "message": "The referenced declaration with name \"avdApp\" is not valid.", "source": "bicep", "startLineNumber": 78, "startColumn": 31, "endLineNumber": 78, "endColumn": 37 },{ "resource": "/home/<redacted>/Desktop/<redacted>/modules/aadapp.bicep", "owner": "_generated_diagnostic_collection_name_#3", "code": { "value": "BCP062", "target": { "$mid": 1, "path": "/bicep/core-diagnostics", "scheme": "https", "authority": "aka.ms", "fragment": "BCP062" } }, "severity": 8, "message": "The referenced declaration with name \"avdServicePrincipal\" is not valid.", "source": "bicep", "startLineNumber": 79, "startColumn": 36, "endLineNumber": 79, "endColumn": 55 }]

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions