Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 32
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 commands in the terminal, and work with a browser. This same power is the main reason why users regularly lose $50–200 in a single work session.

"Cline burned through dollars" — a literal phrase that developers google during their shock at the 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 solve a task. If the task gets stuck in a loop or the agent interprets the instruction incorrectly, it can infinitely retry, sending the entire context to the model and burning tokens each time.

In this article, we cover the real reasons why Cline runs into money holes, specific consumption figures in typical scenarios, and switching to the cheap JoinGonka Gateway, where the same Cline continues to do the same things for $0.003 per million tokens — 1000 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 provides identical economics: $0.003 per 1M input tokens and $0.009 per 1M output tokens, with no hidden markups.

Comparison of typical tasks:

Task TypeTotal tokensCline + AnthropicCline + JoinGonkaSavings
Simple (1 function)~750K$3$0.0036×830
Medium (refactoring)~4M$15$0.019×780
Complex (feature)~12M$40$0.058×690
Looped~50M$165$0.24×690
Night run (worst case)~200M$700$0.96×730

The main psychological effect is removing the fear of loops. A looped Cline on JoinGonka costs $0.24 instead of $165, and the worst-case scenario with an overnight run without supervision is $0.96 instead of $700. This doesn't mean loops can be ignored (they consume time and can corrupt files), but it shifts from a "financial catastrophe" category to a "normal operating cost" category.

What is inside JoinGonka? The Kimi K2.6 model with a MoE architecture. In coding benchmarks, it holds up at the level of Claude Sonnet 4.6; for autonomous agent tasks with tool calling, it shows comparable success on the SWE-bench benchmark. More on 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 is critically dependent on the model's ability to correctly call functions — read_file, write_file, execute_command, browser. Kimi K2.6 supports native tool calling. In practice, this means that Cline via JoinGonka makes the same tool calls as it does via Anthropic, with no degradation in functionality.

How to switch Cline to JoinGonka

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

npx @joingonka/setup --tool cline

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

Manual setup (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 are suitable: "OpenAI Compatible" and "Anthropic".

Step 1. Get your JoinGonka API key. Go to gate.joingonka.ai/register, sign up, and get 10 million 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 in the plugin itself.

Step 3a. Connecting 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 your settings and click "Test connection" — it should take 1–3 seconds.

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

Step 5. Validation. Give Cline a small task — for example, "read this file and explain what it does." If the agent successfully reads the file (confirming that tool calling works) and provides a meaningful answer, setup is complete. In the JoinGonka Dashboard, you will see real-time usage receipts for the tokens consumed.

If you want to use other AI tools in parallel — the same JoinGonka key works with Cursor, Claude Code, Aider, Continue.dev. All of them are billed from the same balance.

What it will cost: real cases

Let's take three real-world Cline usage scenarios and calculate the monthly costs when switching from Anthropic to JoinGonka Gateway.

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

  • Anthropic: 30M × $0.005 (averaged input+output) ≈ $150/month.
  • JoinGonka: 30M × $0.0048 ≈ $0.14/month. Savings — 1000x.

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

  • Anthropic: 200M × $0.005 ≈ $1000/month.
  • JoinGonka: 200M × $0.0048 = $0.96/month. Savings — 1000x.

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

  • Anthropic: 1B × $0.005 = $5000/month.
  • JoinGonka: 1B × $0.0048 = $4.80/month. Savings — 1000x.

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

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

If you use several agentic tools, also check out the articles on 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 under peak loads.

Practical recommendations for loop control. Even on JoinGonka, it is wise to keep protection against a runaway agent. In Cline settings, enable Max Requests Per Task (30–50 for normal tasks), set Auto-approve only for safe operations (read_file, search_files), and always leave write_file and execute_command on manual confirmation. Loops waste your time — they no longer waste money. These boundaries help quickly identify tasks where Cline cannot find a solution and reformulate the prompt instead of endless iterating.

When Cline is better than Cursor / Claude Code and vice versa. Cline is stronger in long autonomous tasks where the agent needs to take initiative — something like "research 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 ground: more autonomous than Cursor, but less verbose than Cline. With JoinGonka Gateway, you can keep all three tools connected simultaneously through the same key and choose the one that best fits the specific task — without worrying about three separate bills.

Cline burned through dollars as a consequence of the open-loop agent architecture: every step is the full context in the LLM, loops rack up tokens to 100M+ overnight, and auto-approval removes control. Anthropic Claude Sonnet 4.6 in this scheme costs $3–15/1M, which turns into $50–500 for a single run. JoinGonka Gateway provides the same level model for $0.003/1M via OpenAI or an Anthropic-compatible endpoint — savings of 1000x eliminate the financial risk of autonomous work.

Want to learn more?

Explore other sections or start earning GNK right now.

Try via JoinGonka Gateway →