Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 52
Glossary 12

Tools

Cline is burning money — why the agent spends so much

"I left Cline running for the night and woke up to a $187 bill" — a typical post on Reddit r/cursor or r/ChatGPTCoding in 2026. Cline (formerly Claude Dev) is a powerful autonomous AI agent for VS Code that can read files, edit code, run terminal commands, and work with the browser. This same power is the main reason why users regularly lose $50—200 in a single work session.

"Cline burned through dollars" is a literal phrase developers search for when in shock from a bill. Unlike Cursor with request limits or Claude Code with built-in context length control, Cline is an open-loop agent that decides for itself how many steps it needs to complete a task. If a task gets stuck in a loop or the agent misinterprets an instruction, it may repeat attempts indefinitely, sending the entire context to the model each time and burning tokens.

This article covers the real reasons why Cline slips into money pits, specific usage figures in typical scenarios, and switching to the low-cost JoinGonka Gateway, where the same Cline continues doing the same thing for $0.0069 per million tokens — ~430 times cheaper than Anthropic.

Why Cline burns dollars

Cline is designed as an autonomous agent: the user describes a task, the agent devises a plan, executes steps, verifies results, and iterates until completion. This fundamentally distinguishes it from chat assistants like ChatGPT or interactive editors like Cursor. And it's this open-loop design that explains uncontrolled spending.

There are three main problems. First, each agent step is a separate round-trip to the LLM with full context. Cline sends to the model: the system prompt (several thousand tokens with instructions), the history of all previous messages, the contents of all read files, the results of executed commands and tool calls. By the tenth step, the context swells to 100-200K tokens, and each subsequent request sends this entire volume again.

The second problem is cycles. If the agent receives an ambiguous instruction or encounters an error it cannot correctly interpret, it starts repeating attempts. A typical pattern: 'let me try again', 'let me double-check', 'maybe I missed something'. Each such iteration is 100-200K input + 5-10K output. Over 50 iterations overnight, this turns into 5-10M input + 250-500K output — tens of dollars for a single task.

The third problem is auto-approve tool calls. Cline has a mode where the agent can execute commands without user confirmation. This is convenient for speed but creates conditions for non-stop operation: the user clicked 'start', went to sleep, and the agent ran 200 iterations overnight, each of which is charged as a full request to Claude Sonnet 4.6.

Actual consumption figures (based on public user reports):

  • Simple task (create one function from a description): 5-15 steps, ~500K-1M total tokens ≈ $2-4 on Anthropic.
  • Medium task (refactor a module of 3-5 files): 20-40 steps, ~3-5M total tokens ≈ $10-20.
  • Complex task (implement a feature with tests): 50-80 steps, ~10-15M total tokens ≈ $30-50.
  • Looping task (agent stuck in a loop): 100-300 steps, 30-80M total tokens ≈ $80-250.
  • Overnight run without supervision: unpredictable, average user reports range from $50-500 for one night.

The root cause is the cost of Claude Sonnet 4.6 from Anthropic. $3 per 1M input seems harmless until you start multiplying by Cline's cyclical nature. For output, Anthropic charges $15 per 1M, and while output tokens are fewer than input, over long cycles, output also accumulates.

Price comparison: Cline on Anthropic vs JoinGonka

JoinGonka Gateway supports both API formats that Cline can use — OpenAI-compatible (/v1/chat/completions) and the native Anthropic Messages API (/v1/messages). Connecting through either one provides identical economics: $0.0069 per 1M input and $0.021 per 1M output tokens, with no hidden markups.

Comparison of typical tasks:

Task TypeTotal tokensCline + AnthropicCline + JoinGonkaSavings
Simple (1 function)~750K$3$0.0108×280
Medium (refactoring)~4M$15$0.057×260
Complex (feature)~12M$40$0.174×230
Looping~50M$165$0.72×230
Overnight run (worst case)~200M$700$2.88×240

The main psychological effect is that the fear of loops is removed. Looping Cline on JoinGonka costs $0.24 instead of $165, and the worst-case scenario with an overnight unsupervised run is $0.96 instead of $700. This doesn't mean loops should be ignored (they waste time and can corrupt files), but it shifts the category from "financial disaster" to "normal operating cost".

What's inside JoinGonka — open MoE network models: MiniMax M2.7, DeepSeek V4 Flash, and GLM-5.3 Flash. On code benchmarks, they are neck-and-neck with Claude Sonnet 4.6; for autonomous agent tasks with tool calling, DeepSeek V4 Flash shows comparable success rates on the SWE-bench benchmark. More details on models in the article about best models for code. If you are interested in the general market context, see the overview of the cheapest AI API in 2026.

An important detail about tool calling. Cline is critically dependent on a model's ability to call functions correctly — read_file, write_file, execute_command, browser. All network models support native tool calling. In practice, this means that Cline through JoinGonka makes the same tool calls as it does through Anthropic, without any degradation in functionality.

How to switch Cline to JoinGonka

The easiest way to get ready-made values is the JoinGonka installer — it will output the settings to paste into the Cline panel (the extension keeps its config in the UI, so the installer shows values instead of writing a file):

npx @joingonka/setup --tool cline

Along with the values, the installer will print the real limits of the selected model — the context window and the response ceiling: Cline's own defaults for an unfamiliar model (128K window) don't match any model on the network. Without the flag, npx @joingonka/setup will prompt you to pick a tool from a list — there are already 25 of them: Claude Code, Codex CLI, OpenClaw, Cursor, Cline and others (the full list is in the package README). Then enter the output values into the panel manually:

Set up manually (Plan B)

Cline is configured through the API Configuration panel inside the VS Code extension itself. The extension supports several provider types, and two options work for JoinGonka: "OpenAI Compatible" and "Anthropic".

Step 1. Get your JoinGonka API key. Open gate.joingonka.ai/register, sign up, and get 3M free tokens. Create an API key in the Dashboard (format jg-xxx).

Step 2. Open Cline settings. In VS Code, open the Cline panel (the icon in the Activity Bar), then click the gear icon or the "Settings" menu inside the plugin itself.

Step 3a. Connect via OpenAI Compatible. In the API Provider dropdown, select OpenAI Compatible. Fill in the fields:

  • Base URL: https://gate.joingonka.ai/v1
  • API Key: your jg-xxx key
  • Model ID: MiniMaxAI/MiniMax-M2.7

Below, expand the Model Configuration block and set the model's real limits — Context Window Size and Max Output Tokens: for MiniMax M2.7 these are 200000 and 8192, for DeepSeek V4 Flash — 380000 and 32768, for GLM-5.3 Flash — 390000 and 8192. Turn off the Supports Images toggle: the network's models accept text only.

Step 3b. Alternative — via Anthropic. In API Provider, select Anthropic. Fill in:

  • Anthropic Base URL: https://gate.joingonka.ai (without /v1)
  • API Key: your jg-xxx key
  • Model: leave the default (claude-sonnet-4-6) — the Gateway will substitute the network's default model on its own

Save the settings. There's no separate connection-test button in the Cline form — the connection will be tested by your very first task (step 5) or by the installer itself: it finishes with a live request to the gateway.

Step 4. Protection against loops. Even on JoinGonka, it's worth setting reasonable limits — loops waste your time. In Cline settings, set Max Requests Per Task to 30—50 for ordinary tasks and keep Auto-approve off until you've confirmed the agent is stable on your types of tasks.

Step 5. Check. Give Cline a small task — for example, "read this file and explain what it does." If the agent successfully reads the file (meaning tool calling works) and gives a meaningful answer — setup is complete. In the JoinGonka Dashboard you'll see token usage in real time.

If you want to use other AI tools in parallel — the same JoinGonka key works with Cursor, Claude Code, Aider, Continue.dev. They all bill from a single balance.

What it will cost: real cases

Let's take three real-world usage types of Cline and calculate monthly expenses when switching from Anthropic to JoinGonka Gateway.

Case 1: "Casual user". Launches Cline 2—3 times a week for medium tasks (refactoring, debug, writing tests). Monthly consumption — ~30M total tokens.

  • Anthropic: 30M × $0.005 (average input+output) ≈ $150/mo.
  • JoinGonka: 30M × $0.0099 ≈ $0.297/mo. Savings — approx. 500x.

Case 2: "Active user, full-time with Cline". Uses Cline daily for several hours on large tasks. Monthly consumption — ~200M total tokens (including rare loops).

  • Anthropic: 200M × $0.005 ≈ $1000/mo.
  • JoinGonka: 200M × $0.0099 = $1.98/mo. Savings — approx. 500x.

Case 3: "Team of 5, each with Cline". Active sessions for several developers plus a few large autonomous runs per week. Monthly consumption — ~1B total tokens.

  • Anthropic: 1B × $0.005 = $5000/mo.
  • JoinGonka: 1B × $0.0099 = $9.9/mo. Savings — approx. 500x.

The main psychological shift when moving to JoinGonka is that Cline turns from an "expensive dangerous toy" into a "cheap working tool". You can safely experiment with autonomous modes, leaving an agent to work on complex tasks without worrying about overnight bills. One looped run now costs $0.99 instead of $200.

On an annual horizon, a full-time user saves about $12,000. A team of 5 saves about $60,000. This is a budget for an additional developer, for servers, for marketing — real money freed up simply by changing the inference provider.

If you use several agentic tools, also check out the articles about OpenClaw and the general API quickstart: the same JoinGonka key works everywhere, and the total monthly bill for a team rarely exceeds a few dollars even at peak loads.

Practical recommendations for loop control. Even on JoinGonka, it is reasonable to keep protection against a runaway agent. Enable in Cline settings the options Max Requests Per Task (30—50 for regular tasks), Auto-approve only for safe operations (read_file, search_files), and always leave write_file and execute_command on manual approval. Loops waste your time — but they no longer waste your money. These limits help quickly identify tasks where Cline cannot find a solution and reformulate the prompt instead of endlessly iterating.

When Cline is better than Cursor / Claude Code and vice versa. Cline is stronger in long-term autonomous tasks where the agent must take initiative — something like "explore the project structure and suggest refactoring". Cursor is stronger in interactive sessions with a fast feedback loop — refactoring while writing code. Claude Code is the middle point: more autonomous than Cursor, but less verbose than Cline. With JoinGonka Gateway, you can keep all three tools connected simultaneously via the same key and choose the one best suited for a specific task — without worrying about three separate billings.

Cline burned through dollars as a consequence of the open-loop agent architecture: every step is the full context in the LLM, loops churn through 100M+ tokens overnight, and auto-approve removes control. Anthropic Claude Sonnet 4.6 in this scheme costs $3—$15/1M, which turns into $50—$500 per single run. JoinGonka Gateway provides the same model-level quality for $0.0069/1M via OpenAI or an Anthropic-compatible endpoint — savings of ~430—720 times eliminate the financial risk of autonomous operation.

Want to learn more?

Explore other sections or start earning GNK right now.

Try via JoinGonka Gateway →