Cline
Cline (formerly Claude Dev) is an open-source autonomous coding Agent extension for VS Code. The concept is similar to Claude Code, but it runs inside VS Code.
Key advantages: Support for third-party API relays is far better than Cursor, tool calls (read_file / write_to_file / execute_command) are stable, and it's especially well-suited to agentic workflows. It supports switching between multiple providers — Claude / OpenAI / Gemini / local models.
Learning curve: You need to understand the auto-approve risk (the Agent can run shell commands automatically). Beginners are advised to keep "Execute commands manual confirmation" enabled.
Who it's for: Developers who use VS Code rather than Cursor / the terminal; those who want to run long-chain agentic tasks but prefer to keep a traditional editor interaction.
This tutorial: Point Cline at claude-api.org inside VS Code and run Claude or the GPT-5 series.
A VS Code extension — an open-source autonomous coding Agent. More flexible than Cursor, but with a slightly steeper learning curve.
Recommended Channels
Claude Official (any client)(2.0x): Cline recommends Claude by default (more stable tool calls), with good reliability.Claude Official (Claude Code only)(1.4x) will reject the Cline client.Budget Claude(0.5x): The lowest price, and it also accepts Cline, but quality / reliability is relatively unstable — choose it only if you can tolerate occasional failures.Claude Sonnet Discount(0.5x): If you mainly use Sonnet and want the cheapest option, the Sonnet discount group also accepts Cline, but it's limited to the Sonnet series of models.OpenAI: A backup. GPT-5.4 works too, but it occasionally gets stuck in tool loops.
Installation
VS Code → Extensions → search for "Cline" → Install.
Configuration
Click the Cline icon in the left activity bar → ⚙️ Settings:
API Provider: Anthropic
API Key: sk-你的key(绑 Claude Official (any client))
Model: claude-sonnet-4-6
Anthropic Base URL: https://claude-api.orgAPI Provider: OpenAI Compatible
API Key: sk-你的key(绑 OpenAI)
Base URL: https://claude-api.org/v1
Model ID: gpt-5.4"OpenAI Compatible" rather than "OpenAI"
Cline's "OpenAI" provider uses a special authentication flow (requiring you to log in to an OpenAI account). For a third-party relay, you must select "OpenAI Compatible".
Verification
Open any project in VS Code, click the Cline icon → send "List the files in the current directory".
If Cline calls a tool such as read_file and returns the listing, the setup was successful.
Advanced
Context window settings
By default, Cline reads entire files, so long projects easily hit the context limit. Settings → Context Window:
- Sonnet 4.6/4.7: enter
200000(200K) - Opus 4.7: enter
200000 - Sonnet 4.7[1m] (one-million context): enter
1000000, ⚠️ input price doubles
auto-approve toggles
Convenient but dangerous. We recommend at least keeping Execute commands requiring manual confirmation — Cline will run shell commands, and auto-approving them is like handing over your house.
FAQ
Persistent "Error: Connection error"
- Do not add
/v1to the end of the Anthropic Base URL; just writehttps://claude-api.org - Check the Channel your Key is bound to: running Claude tasks requires a Claude-type Channel
Tool calls keep looping
- Switch to a Claude Channel (Anthropic's tool-use protocol is most stable in Cline)
- If you must use GPT-5: use the
OpenAIChannel and use ChatCompletions(default) in the Cline configuration. Do not let Cline use the Responses API (the tool semantics differ)
Running out of balance mid-task
A Cline agentic task can consume $0.5–$5 at once (including context resends). We recommend a wallet Balance of at least $20 before starting an agent task.
For more, see FAQ.
