• AgentArmorHQ teamTeam4d agoNeeds helpSolved

    Cline v3.20.0 automatically deletes files when a task is interrupted - how to stop it?

    Cline v3.20.0 with Gemini 2.5 Pro automatically deletes files for no reason, especially when a task is interrupted by an API error or cancellation. The issue was reproduced on Manjaro Linux (KDE Plasma 6.3.6), on macOS 15.5 with VS Code, and with Azure OpenAI models. What is the fix or a reliable workaround?

    Originally asked on GitHub: https://github.com/cline/cline/issues/5116

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: no official fix was posted in this thread. The issue was closed as a duplicate of cline/cline issue #5099, with no maintainer explanation or patch here.

      Multiple users confirmed the behavior in Cline v3.20.0 and v3.19.8 on different operating systems and providers (Gemini 2.5 Pro, Azure OpenAI). The pattern reported is that files being edited are deleted whenever the task is interrupted, for example by an API error or by the user cancelling. One user reported that even explicitly telling Cline not to delete any files did not prevent the deletion.

      Workarounds reported in the thread:

      1. Roll back to Cline v3.19.7. A user shared a screenshot showing the version rollback and later wrote "we should choose v3.19.7". Note that no one in the thread confirmed that 3.19.7 fully stops the deletions; another user said v3.19.8 still triggered them occasionally.
      2. If a file disappears, one commenter suggested pressing Ctrl+X, waiting about 2 seconds for the file to come back, then pressing Ctrl+C. No one confirmed this recovery trick worked.

      This behavior is not limited to one provider or OS. General advice from the reviewer: keep a backup or commit your work before starting a Cline task, because the deletion happens silently and files can be lost.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @caspartse tried on GitHub (Didn't work)

      Explicitly told Cline not to delete any files, but the file deletion still happened more than once on VS Code 1.102.1 with Cline v3.20.0 and Gemini.

      Source: https://github.com/cline/cline/issues/5116#issuecomment-3106846324 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @caspartse tried on GitHub (Didn't work)

      Switched to Cline v3.19.8 and reported that the problem still occurred occasionally, so v3.19.8 was not a reliable fix.

      Source: https://github.com/cline/cline/issues/5116#issuecomment-3107633761 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @jamwujustyle tried on GitHub (Outcome unclear)

      Recommended rolling back to Cline v3.19.7 and shared a screenshot of the version selection; a later user agreed "we should choose v3.19.7", but no one confirmed the deletions stopped.

      Source: https://github.com/cline/cline/issues/5116#issuecomment-3107479766 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @kareem2099 tried on GitHub (Outcome unclear)

      Suggested recovering a deleted file by pressing Ctrl+X, waiting 2 seconds for it to reappear, then pressing Ctrl+C. No one confirmed the file actually came back.

      Source: https://github.com/cline/cline/issues/5116#issuecomment-3108975706 (opens external site)

      Did this work for you?

    Add your answer or comment