Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 37
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 a browser. This 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 google in the moment of bill shock. 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 solve a task. If a task gets stuck in a loop or the agent interprets the instruction incorrectly, it can endlessly repeat attempts, each time resending the entire context to the model and burning tokens.

This article covers the real reasons why Cline leads to money pits, provides specific consumption numbers in typical scenarios, and explains switching to the low-cost JoinGonka Gateway, where the same Cline continues to do the same work for $0.0047 per million tokens — ~470 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 uses: OpenAI-compatible (/v1/chat/completions) and the native Anthropic Messages API (/v1/messages). Connecting through either provides identical economics: $0.0047 per 1M input tokens and $0.014 per 1M output tokens, with no hidden fees.

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
Night run (worst case)~200M$700$2.88×240

The main psychological effect is the removal of the fear of loops. A Cline loop on JoinGonka costs $0.24 instead of $165, and the worst-case scenario with an unsupervised night run is $0.96 instead of $700. This does not mean loops can be ignored (they consume time and can corrupt files), but it shifts the situation from a "financial catastrophe" category to "normal operating cost".

Inside JoinGonka is the Kimi K2.6 model with MoE architecture. On code benchmarks, it holds up to the level of Claude Sonnet 4.6; for autonomous agent tasks with tool calling, it shows comparable success on the SWE-bench benchmark. More about the model in the article about Qwen3-235B. If you are interested in the overall market context, check out the review of the cheapest AI API in 2026.

An important detail about tool calling. Cline critically depends on the model's ability to call functions correctly—read_file, write_file, execute_command, browser. Kimi K2.6 supports native tool calling. In practice, this means Cline via JoinGonka performs the same tool calls as via Anthropic, without any functional degradation.

How to switch Cline to JoinGonka

The easiest way to get the settings is to use the JoinGonka installer — it will display the values to paste into the Cline panel (the extension stores the config in the UI, so the installer shows the values rather than writing a file):

npx @joingonka/setup --tool cline

Without a flag, npx @joingonka/setup will prompt you to select a tool (Claude Code, OpenClaw, or Cline). Then enter the displayed values into the panel manually:

Configure manually (Plan B)

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

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

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

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

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 as default (claude-sonnet-4-6) — the Gateway automatically maps it to Kimi K2.6

Save the settings and click "Test connection" — it should complete in 1—3 seconds.

Step 4. Loop protection. Even on JoinGonka, you should set reasonable limits — loops waste your time. In Cline settings, set Max Requests Per Task to 30—50 for regular tasks and keep Auto-approve disabled until you are sure of the agent's stability with your specific task types.

Step 5. Verification. 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 provides a meaningful answer, setup is complete. In the JoinGonka Dashboard, you will see a receipt of used tokens 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 draw from the same 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 due to the open-loop agent architecture: every step involves the full context in the LLM, loops rack up 100M+ tokens overnight, and auto-approval removes control. Anthropic Claude Sonnet 4.6 in this scheme costs $3—15/1M, which turns into $50—500 per run. JoinGonka Gateway provides the same tier model at $0.0047/1M via OpenAI or Anthropic-compatible endpoint — a ~500x saving removes the financial risk of autonomous operation.

Want to learn more?

Explore other sections or start earning GNK right now.

Try via JoinGonka Gateway →