Short version: OpenCode is the most-starred open-source coding agent of 2026, with Codex CLI and Gemini CLI close behind. For VS Code, pick Cline. For autonomous work in a sandbox, OpenHands. All numbers below are from the GitHub API on 18 September 2026, which also revealed that two popular agents have moved organisations and one well-known agent has slowed down.

Terminal agents
**OpenCode** is an open-source coding agent for the terminal and the clear leader by stars this year. Provider-agnostic, so you can point it at hosted or local models.
**Codex CLI** (Apache-2.0) is OpenAI's open-source agent, with OS-level sandboxing when it runs locally. It can also use a ChatGPT subscription you already pay for.
**Gemini CLI** (Apache-2.0) is Google's open-source agent. Note that for unpaid-tier and Google One users, Google replaced it with Antigravity CLI on 18 June 2026; the code remains open source.
**Goose** (Apache-2.0), now at its new home aaif-goose/goose, is an extensible local agent built around MCP.
**Aider** pioneered git-centric pair programming in the terminal. Still useful; its last code push was in May 2026.
In the editor
**Cline** runs inside VS Code, shows every change as a diff and asks before acting. The friendliest place to start.
Autonomous, in a sandbox
**OpenHands** (MIT), formerly All-Hands-AI, runs an agent in a sandboxed environment and works through tasks end to end. Suited to delegating well-scoped issues.

How to pick
- Pick the surface.
- Terminal: OpenCode or Codex CLI.
- VS Code: Cline.
- Hands-off: OpenHands.
- Pick the model route.
- Existing subscription: Codex CLI can use ChatGPT plans.
- Your own key: any of them.
- Fully local: OpenCode, Cline or Goose with Ollama.
- Keep skills portable.
- Most read SKILL.md, so the same skills follow you between agents.
Want a hosted agent instead? Our Claude Code vs Codex comparison covers the paid options.