Cline is having trouble...
The message
Cline is having trouble...What it means
The model made several mistakes in a row (broken tool calls, failed tools or API errors) and Cline stopped the task instead of letting it keep burning tokens. The task isn't lost.
What to do
Send a message telling Cline what to do differently, which resets the count and resumes. If it keeps happening, switch to a model that handles tool calls well, or raise the context window on a local model.
Older versions of the VS Code extension show a red header and a note about your model:
Cline is having trouble...
Cline uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.5 Sonnet for its advanced agentic coding capabilities.
In Cline 4 (we read the v4.1.21 source, released September 24, 2026) the same stop arrives as an error row with new words:
Cline ran into N errors in a row and stopped the task.
Latest: invalid_tool_call: ...
Send a message to give Cline guidance and continue the task.
What Cline counts as a mistake
Cline gives the model a set of tools, for reading files or running commands, and expects each reply to call one of them properly. Its mistake tracker counts three things: invalid_tool_call, when the reply was malformed or left out a required field; tool_execution_failed, when the tool ran and failed; and api_error, when the provider's request failed. Any success resets the count. Hit the limit and Cline stops the run, so a confused model doesn't keep spending your tokens.
The "Latest:" line tells you which one it was, and that's the useful part. The Cline CLI uses a limit of 3 unless you pass --retries.
The missing-parameter retries that lead up to it
Often the screen fills with retries first. Older versions printed lines like Cline tried to use write_to_file without value for required parameter 'content'. Retrying..., and in v4 the model is told Missing value for required parameter instead. For write_to_file Cline now sends a longer explanation: the content was empty, which "typically happens when the file content is too large to generate in a single response, or when output token limits are reached". So a model asked to write one huge file can run out of output room partway through, fail the same way again, and trip the limit.
Asking for the file in smaller pieces, or asking for an edit instead of a full rewrite, gets around that. The long-running issue about file-editing failures, #4384, has 47 comments and was still open on September 26.
Why local models hit it most
The oldest thread, #1094, is someone running codellama:7b through Ollama. A Cline contributor gave two reasons there. Ollama's default context was then 2,048 tokens, while Cline needs roughly 16K to 32K, so Cline's long instructions got cut off before the model saw them. And CodeLlama 7B wasn't trained for the tool-call format Cline uses. Their suggested fix was a Modelfile that raises the window:
FROM codellama:7b
PARAMETER num_ctx 32768
built with ollama create -f modelfile custom-codellama, or a model tuned for tool calls. A bigger window only helps if you have the memory for it (our “does not support tools” page covers the Ollama side).
Continuing the task
Nothing is thrown away when this appears. Type a message with actual guidance ("the file is too big, write it in three parts" works better than "try again"), and Cline resumes with the count reset. If the latest reason is api_error, the fault is with the provider, and a different model or a short wait is the fix.
Other lines the same feature prints
Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.
Cline ran into N errors in a row and stopped the task.Send a message to give Cline guidance and continue the task.Cline uses complex prompts and iterative task execution that may be challenging for less capable models.Cline tried to use write_to_file without value for required parameter 'content'. Retrying...Missing value for required parameter