Guides
How to choose a terminal coding agent: models, permissions and cost
Choose a terminal coding agent by model lock-in, local model support, MCP tools, permissions and license, then add the model provider's bill to its price.
Choose a terminal coding agent by three things: which models it can call, whether it can run local models, and how it asks before editing files or running commands. Vendor agents such as Claude Code and OpenAI Codex center on one company's models, while open-source agents such as OpenCode and Aider connect to many providers. The terminal coding agent ranking weighs quality and control first, then model choice, local model support, license and price.
This guide uses the products' official documentation, checked November 1, 2026. It compares documented features and fit for a workflow. It does not measure how well any agent writes code, so read the scores as editorial judgments.
Decide how much model lock-in you accept
Model lock-in is the first split. Claude Code runs Claude models only, through Anthropic or cloud hosts, and it comes with Claude's paid Pro and Max plans rather than a separate free tier. Its source is closed, so you cannot read or change how the agent works.
OpenAI Codex sits at the other end of the vendor split. Its CLI is open source under Apache-2.0, but model access goes through OpenAI's services, so an OpenAI account is part of the setup. It also accepts custom OpenAI-compatible providers, which widens the choice beyond OpenAI models.
Agents that connect to many providers reduce that dependence. OpenCode is MIT licensed, includes free models, and connects models from many providers, including Claude, GPT and Gemini. Cline works with any model the user connects, and goose connects to more than 15 providers. The model you connect still sets the results, so check the model before you judge the agent.
Check local model support before you commit
Local models matter when code or prompts must stay on your own machines. Claude Code is the exception in this group, since it runs Claude models only and cannot use a local model. Most other agents here connect to local servers such as Ollama, LM Studio or vLLM. Local models need a capable machine, and the hardware sets their speed.
Aider works with almost any cloud or local model, and OpenAI Codex includes built-in Ollama and LM Studio providers. Factory Droid also accepts local models through bring-your-own-key setups, although it is a paid product.
Check the local model path in the agent's documentation before you commit, and test it with a model size your hardware can run. A server the agent can reach does not show how well a particular model handles code.
Compare MCP and tool server support
MCP, the Model Context Protocol, lets an agent use outside tools such as a documentation server or an issue tracker. Claude Code, OpenAI Codex, OpenCode, Cline and goose support MCP servers, and Factory Droid does too. Aider has no built-in MCP support. Pi can add MCP only through extensions, because MCP is not built in.
Tool support is a practical question rather than a checkbox. List the tools your work needs, then confirm that the agent can start those servers and that you can see what each one does. A tool server adds another source of commands, so review what each server is allowed to run.
Compare permissions and sandboxing
Permissions shape daily use more than feature lists do. Cline asks before each edit and command unless auto-approve is on, which keeps you in the loop for every change. Factory Droid's CLI includes approvals, and its hooks run commands around agent lifecycle events.
Pi is the clearest contrast. It has no built-in permission system, and its documentation suggests a container or sandbox when stronger boundaries are needed. Without one, it runs with your own permissions.
Ask whether the agent asks before running commands, and whether you can run it inside a container. Where the answer is no, put the boundary in place yourself before you point the agent at a repository you care about.
Work out the license and the real cost
License and price answer different questions. Aider, OpenCode, Cline, goose and Pi use Apache 2.0 or MIT licenses, so their source can be read and modified. Claude Code and Factory Droid are closed source. Factory Droid's pricing page lists paid plans from $20 a month and no free plan, while Claude Code is included in paid Claude plans with no separate free tier listed.
The agent price is only part of the bill. Open-source agents cost nothing to license, but the model provider bills for the tokens it processes. Aider and Cline both state that model cost depends on the provider you connect. Add that bill to the agent price before you compare totals.
Our picks
The products covered here are listed in the order the ranking places them, with the editorial score in brackets.
- Claude Code (93.0): professional work in a large codebase on Claude models.
- OpenAI Codex (91.5): an open-source terminal agent for OpenAI models, with built-in Ollama and LM Studio providers.
- OpenCode (90.0): an MIT-licensed agent that switches between many providers, including local ones.
- Aider (85.5): git-based pair programming, with a commit for each AI change.
- Cline (82.0): an approval-first agent in the terminal or editor.
- goose (80.0): a general-purpose agent with a desktop app, a CLI and MCP extensions.
The ranking also includes GitHub Copilot (87.0), which has a free plan and measures usage in GitHub AI Credits, Qwen Code (79.0), an Apache 2.0 agent from Alibaba Cloud with subagents and runtime provider switching, and Crush (72.5), which switches models mid-session and uses language servers for code context under a Functional Source License.
The ranking also includes YunusPi* (65.0), an MIT-licensed harness for Linux with persistent project memory and bounded subagents, and PocketHarness* (62.0), an MIT-licensed Linux harness in one binary with no MCP and no subagent framework.
Compare head to head
Mentioned in this article
Claude CodeAnthropic's agentic coding tool for the terminal, IDE, Slack and web
OpenAI CodexOpenAI's open-source coding agent for the terminal
OpenCodeOpen-source AI coding agent for the terminal, IDE and desktop- AiderOpen-source terminal tool for pair programming with LLMs
ClineOpen-source coding agent for desktop, IDE, terminal and SDK
gooseOpen-source AI agent with desktop, CLI and API
Factory DroidPaid coding agent CLI with custom droids and BYOK
PiMinimal extensible coding agent with an MIT license
GitHub CopilotGitHub's AI coding assistant and agent for editors, CLI and GitHub
Qwen CodeOpen-source coding agent for the terminal and editors
CrushTerminal coding agent from Charm with LSP and MCP support
YunusPi (made by the publisher of this site)Coding-agent harness with project memory and bounded subagents
PocketHarness (made by the publisher of this site)Tiny coding-agent harness for Linux in one C++ binary
Related lessons
Learning CenterKeep reading
All articles- Roundups · 5 min readBest AI coding assistants compared by how they workCompare AI coding assistants by how they work, editor-integrated, terminal agent or open-source, with their pricing models and how much of the source you can read.
- Comparisons · 5 min readClaude Code vs Cursor: Which AI Coding Assistant Fits You?Claude Code is a terminal-first agent included in Claude Pro and Max, while Cursor is an AI code editor with a free Hobby plan. Compare workflows, plans and limits.
- Guides · 4 min readHow to choose an LLM fine-tuning tool: where it runs and howChoose a tool to fine-tune an open-weight model by where training runs, code or no-code use, LoRA, QLoRA or full methods, GGUF export and license costs.



