Blog

Cline vs Claude Code: same model, headless test

Cline vs Claude Code tested on the same DeepSeek model, with commands, permission settings, exit codes, token counts and prices for unattended coding runs.

On this page · 8 sections
  1. Cline vs Claude Code at a glance
  2. The task and commands to repeat it
    1. Claude Code through DeepSeek
    2. Cline CLI through DeepSeek
  3. Default permissions when nobody approves
    1. Bad credentials fail differently
  4. Token use on the same model
  5. Pricing
  6. Cline vs Codex
  7. Where Orbi fits
  8. Related

Cline is an Apache-2.0 open-source coding agent with a VS Code extension and a CLI; Claude Code is Anthropic's terminal coding agent. If you are choosing between them for scripts or unattended runs, this Cline vs Claude Code test gives you results from both agents on the same DeepSeek model and the same failing test, plus the commands to repeat it.

I'm Larry 🍀 Orbi, the creator of Orbi. Orbi turns GitHub Issues into reviewed, merged PRs using Pi, a different open-source agent; it does not run Cline or Claude Code.

Cline vs Claude Code at a glance

Your requirement Start with What to check
Open-source agent in VS Code and a CLI Cline Provider configuration and tool approvals
Terminal agent included in your Claude plan Claude Code Plan access and subscription allowance
Want tools auto-approved Cline CLI Its one-shot runs auto-approve tools
Approve tools one by one Claude Code Set a mode and allow the tools your task needs
A fix your script can verify Either Inspect the diff and run tests independently

The measurements below use DeepSeek API billing, outside Claude subscription models and allowances. On one small task, both fixed the bug once permissions allowed it. For an editor comparison, see Cursor vs Claude Code.

The task and commands to repeat it

I tested on 18 November 2026 on Linux with Node v22.23.1, Claude Code 2.1.322 and Cline CLI 3.0.74. Both used deepseek-flash, identified by DeepSeek as DeepSeek-V4.1-Flash. I ran everything under an isolated HOME, with configuration directories created new for this test and shared by all runs of the same agent, so my own instructions and permission settings could not affect the results.

The fixture was a three-file Node repository. npm test ran node --test; two of four tests initially failed. The function replaced each separator individually and left hyphens at the edges.

Save the files below in a throwaway checkout and commit the failing version. Start each attempt from that version. These short commands use your installed versions and user settings; to compare defaults, use the tested versions and fresh settings described above.

package.json:

{"name":"slug-fixture","version":"1.0.0","type":"module","scripts":{"test":"node --test"}}

src/slug.js:

export function slugify(title) {
  return title.toLowerCase().replace(/[^a-z0-9]/g, "-");
}

test/slug.test.js:

import { test } from "node:test";
import assert from "node:assert/strict";
import { slugify } from "../src/slug.js";

test("basic", () => assert.equal(slugify("Hello World"), "hello-world"));
test("collapses runs", () => assert.equal(slugify("Cline  vs -- Claude Code"), "cline-vs-claude-code"));
test("trims edges", () => assert.equal(slugify("  Hi! "), "hi"));
test("empty", () => assert.equal(slugify(""), ""));

Claude Code through DeepSeek

With Claude Code installed, use DeepSeek's Anthropic-compatible endpoint. I pinned the model as follows; DeepSeek's guide also sets the Haiku variable, which keeps Claude Code's smaller background model on DeepSeek too. Replace the quoted key placeholder before running:

export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN="<your DeepSeek API key>"
export ANTHROPIC_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
claude -p "The tests fail. Fix the bug in src/slug.js so that npm test passes. Do not change the tests." \
  --permission-mode acceptEdits \
  --allowedTools "Bash(npm test)" \
  --output-format json

Cline CLI through DeepSeek

Set the same provider key, then run:

npm install -g cline
export DEEPSEEK_API_KEY="<your DeepSeek API key>"
cline -P deepseek -k "$DEEPSEEK_API_KEY" -m deepseek-flash --json \
  "The tests fail. Fix the bug in src/slug.js so that npm test passes. Do not change the tests."

The Cline CLI docs say headless mode activates with --json, piped stdin or redirected output. Its JSON output is an event stream.

After either agent, run:

git status --short && npm test && git diff --name-only

The expected changed path is src/slug.js, with test files untouched and all four tests passing. Exit code 0 alone did not establish that the fix landed.

Default permissions when nobody approves

For Claude Code vs Cline in a script, the default permissions made the biggest difference in my runs. Claude Code's permission docs say that since v2.1.302, claude -p without a permission mode starts in Manual mode. Calls needing approval are denied unless another mechanism allows them.

The Cline CLI README says tool calls are auto-approved by default and one-shot runs use yolo mode. So the same prompt, run unattended with each tool's defaults, edits files in one agent and not in the other.

All rows below used the fix prompt printed above. Times are wall time; run IDs identify separate attempts.

Configuration Runs and time Result after the process ended Exit
Claude Code, no permission mode E1a: 45.7s; E1b: 82.9s No edit; two tests still failed 0
Claude Code, acceptEdits and Bash(npm test) allowed E3: 7.8s; E14: 10.5s Only source changed; 4/4 passed 0
Claude Code, dontAsk and Read,Edit,Bash(npm test) allowed E4: 8.4s Only source changed; 4/4 passed 0
Cline, default approvals E2a: 10.1s; E2b: 9.8s; E15: 10.7s Only source changed; 4/4 passed 0
Cline, --auto-approve false E5 Tools blocked; tests unfixed; aborted 0
Cline, --plan E8 No file changed 0

Claude Code's default runs recorded 9 and 16 permission denials. Every attempted Edit, Write or Bash call was denied. It printed the correct fix in its answer, but the file stayed unchanged, and its JSON reported is_error: false.

With auto-approval disabled, Cline said its tools needed approval in a TTY session, or interactive terminal. It then asked a question that nobody was there to answer. These fields came from the failed attempts:

Claude Code E1a: "is_error": false
Cline E5: "type": "run_result", "finishReason": "aborted"

The Claude Code command above uses acceptEdits to allow file edits and separately approves the test command. For CI, I would use the documented dontAsk mode and list the allowed tools explicitly. Despite the name, dontAsk is the strict option: any call that still needs approval is denied instead of prompting. This command also passed:

claude -p "The tests fail. Fix the bug in src/slug.js so that npm test passes. Do not change the tests." \
  --permission-mode dontAsk \
  --allowedTools "Read,Edit,Bash(npm test)" \
  --output-format json

The unattended guide covers running the process. Reserve bypassPermissions or --dangerously-skip-permissions for isolated containers; Claude Code yolo mode explains that broader permission choice.

I also asked, "Why does npm test fail in this repo?" Neither default agent edited files. Claude Code diagnosed from reading despite three denied test calls; Cline ran the tests and diagnosed. Both exited 0. Cline's auto-approval permitted edits, but this diagnostic prompt did not cause one.

Bad credentials fail differently

Wrong DeepSeek key Error Wall time Exit
Claude Code Failed to authenticate. API Error: 401 178.5s, including retries 1
Cline Authentication Fails 1.2s 1

Claude Code kept retrying the 401 for about three minutes before it exited, so give the step its own timeout if a stuck credential should not hold up the job.

Token use on the same model

The token ranges below come from one small task: three successful Cline runs with default approvals and two successful Claude Code acceptEdits runs. They are too limited to serve as a benchmark.

Agent Input tokens, including cache reads Cached input subset Output tokens
Cline, E2a/E2b/E15 33,588 to 42,217 25,856 to 34,304 849 to 959
Claude Code, E3/E14 59,710 to 74,426 46,976 to 61,184 655 to 783

Each column shows its own lowest and highest value across the runs, so the endpoints in one column may come from a different run than those in the next.

For Claude Code, I added input_tokens and cache-read tokens: E3 was 12,734 + 46,976; E14 was 13,242 + 61,184. Cline's inputTokens already includes cache reads, so adding them again would double-count them.

With the minimal prompt reply ok in the isolated setup, Claude Code used 11,162 input tokens and Cline used 5,325. The input includes the agent's context even for a prompt this short. Cline used fewer input tokens in this setup; a larger repository still needs its own measurement.

Pricing

I checked these prices on 18 November 2026. Compare tool access separately from the model bill.

Route Price and access
Cline for individuals Free software; pay for inference usage, including through your own provider key
ClinePass Optional $9.99/month flat subscription; not tested here
Cline Enterprise Custom pricing
Claude Free Does not include Claude Code
Claude Pro $20/month billed monthly; $17/month on annual billing; includes Claude Code
Claude Max / Ultra Max from $100/month; Ultra $200/month; include Claude Code
Claude Code with an API key or gateway Usage billed through that route; my tests used DeepSeek

Claude Code pricing explains the subscription and API routes.

DeepSeek's deepseek-flash list prices, per million tokens:

Token category Off-peak Peak
Cache-hit input $0.003 $0.006
Cache-miss input $0.15 $0.30
Output $0.60 $1.20

Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday through Friday, excluding Chinese public holidays; all other hours, including weekends and those holidays, are off-peak. My runs were around 02:00 UTC on Wednesday, inside a peak window.

Claude Code reported about $0.081 in total_cost_usd for E14 while printing [claude-code:unrecognized_model]. The same JSON marks its cost basis as unknown, so ignore that field with third-party models. Cline reported about $0.0018 for E15. That matches DeepSeek's off-peak price for its token counts, although the run fell inside a peak window, so Cline's figure appears to leave out the peak rate. These tool-reported values do not establish a ratio between actual charges.

Working from the token counts above at peak list price, E14 comes to about $0.0053 (13,242 × $0.30 + 61,184 × $0.006 + 783 × $1.20, per million) and E15 to about $0.0035 (7,732 uncached × $0.30 + 25,856 × $0.006 + 849 × $1.20). The DeepSeek account balance, displayed to 0.01 CNY, had not moved when I checked 20 seconds after each run, so I could not confirm the actual charge from the account.

Cline vs Codex

I tested Codex CLI 0.167.0 on the same fixture using its default gpt-6.2-sol through a ChatGPT login. This was a different model, so there is no token comparison.

codex exec "The tests fail. Fix the bug in src/slug.js so that npm test passes. Do not change the tests."

With fresh configuration, the default sandbox was read-only and approval was never. It changed nothing, exited 0 and took 28 seconds. Allowing workspace writes fixed the source and passed all four tests in 15 seconds:

codex exec -s workspace-write "The tests fail. Fix the bug in src/slug.js so that npm test passes. Do not change the tests."

On the same fixture, Cline's default one-shot run needed no extra flag: it auto-approved its tools and fixed the bug (4/4 passing), while Codex's default changed nothing until I allowed workspace writes. Codex's read-only default is the safer one until you have watched a script run. Since both returned 0 even when they made no changes, the script also needs to check the files. OpenCode vs Codex has a separate headless comparison; Codex usage limits covers allowance questions.

Where Orbi fits

You can use Cline and Claude Code while coding or run them through automation you configure, including Cline's scheduled runs via cline schedule create ... --cron. You still need to configure PR review and merging.

Orbi starts from a GitHub Issue labelled ai-ready, implements with Pi, has a separate session review the work, and merges when review passes and CI is green.

In Claude Code, the Orbi plugin provides /orbi:ship to write the current task as an Issue. In a repository Orbi delivers, it adds ai-ready after confirmation. /orbi:status checks status.

For Cline, I verified this skill installation:

cline skill add orbi-build/orbi --skill write-ai-ready-issue -y

It copied write-ai-ready-issue into ./.agents/skills/write-ai-ready-issue, the folder the skills CLI uses for Cline. Once installed, the skill lets you ask Cline to write the task as an Issue. I verified that the skill installed; I did not test a full Cline-to-Orbi delivery. According to the plugin README, the skill also loads in Codex, Copilot and Cursor, and the /orbi: commands load only in Claude Code and Cursor. Orbi compared with Claude Code explains the handoff; Orbi is a poor fit when you want an agent to pair with you live.

What is new in Orbi, every week

One email a week: new features, hands-on posts and numbers from our own work with Orbi. Unsubscribe anytime.