contenox

Terminal coding agents: what they are and which one to use

Updated

BASICS Terminal coding agents

Terminal coding agents are AI coding agents you run as a command in your project folder. You type claude, codex or opencode, describe a task, and the agent reads your files, edits code and runs commands right there in the shell, asking before the risky steps. The best known are Claude Code, Codex CLI and OpenCode.

What it looks like

~/shop $ claude
> The checkout test fails since yesterday. Find out why and fix it.

  Read   src/checkout/total.ts
  Bash   npm test -- checkout          1 failing
  Edit   src/checkout/total.ts         +2 -1
  Bash   npm test -- checkout          all passing

  Discounts were applied after tax instead of before. Fixed in total.ts.

Every step scrolls past in the same terminal. When the agent wants to do something your settings say needs approval, it stops and asks, and you answer with a key.

Why do developers use a terminal agent instead of an IDE agent?

The reasons people give, in their own words, come down to four:

  • It doesn’t care about your editor. Keep VS Code, Neovim, JetBrains or Notepad. The agent works on the files; you look at them however you like.
  • You can run two at once. Opening two IDEs on one project is awkward. Two terminals are not. Give each agent its own git worktree and let them work in parallel.
  • It runs wherever a shell runs: over SSH on a server, inside a container, in WSL.
  • It is a process, so you can script it. Claude Code’s claude -p "..." and Codex’s codex exec "..." run one task without the interactive screen, which is how agents end up in CI jobs and shell scripts.

What’s the catch?

  • Reviewing diffs is harder. A terminal shows changes as text. Most people keep an editor or git diff open next to it, so you end up with two windows anyway.
  • Windows is a second-class citizen in places. OpenCode recommends WSL on Windows. Claude Code runs natively in PowerShell, but its sandbox needs WSL 2. See AI coding agents on Windows for each agent.
  • The terminal itself is a barrier if it isn’t already where you work. Then a desktop app or an agent inside your editor is the shorter path.

Which terminal coding agent should I use?

AgentModelsLicensePick it if
Claude CodeClaude models, with a Claude plan or API keyProprietaryYou use Claude, and want the agent built by the company that trains it
Codex CLIOpenAI models with a ChatGPT plan or API key; other providers you configure, such as Ollama or Amazon BedrockApache-2.0You already pay for ChatGPT
OpenCodeAny provider, with your own keys, or a ChatGPT or GitHub Copilot sign-inMITYou want open source and model choice in one tool
Antigravity CLIGemini, plus a fixed list that includes Claude modelsGoogle’s termsYou used Gemini CLI on a personal account (see below)
AiderMost cloud and local modelsApache-2.0You want to pick the files yourself and get a git commit per change; note its last release was in February 2026

They change fast. Best AI coding agents ranks a wider field. Read each tool’s own docs before you settle, and try two on the same real task: how to choose a model for coding has a simple method that works for agents too.

How do I install one?

Claude Code needs a paid Claude plan or an Anthropic Console account. The free claude.ai plan doesn’t include it.

irm https://claude.ai/install.ps1 | iex

On macOS, Linux or WSL:

curl -fsSL https://claude.ai/install.sh | bash

Open a new terminal, go to your project and run claude. It opens your browser to sign in.

Install Git for Windows too. Without it, Claude Code runs commands in PowerShell instead of Bash, and many shell commands the model knows by heart behave differently.

Codex CLI signs in with your ChatGPT plan or uses an API key.

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

On macOS or Linux:

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Run codex and choose Sign in with ChatGPT.

OpenCode works with any provider you have a key for, and can sign in with a ChatGPT or GitHub Copilot plan.

curl -fsSL https://opencode.ai/install | bash

On Windows, OpenCode recommends running it in WSL. Natively, scoop install opencode or choco install opencode work. Start it with opencode, then run /connect to add a provider.

The two-versions trap: these commands install OpenCode 1, the version in OpenCode’s main docs. OpenCode 2 installs differently (its own docs, zip downloads on Windows), and both use the opencode command, so they can’t sit side by side. Check which one a tutorial means before you copy its command.

Antigravity CLI, Google’s agent, signs in with a Google account or a Gemini API key.

irm https://antigravity.google/cli/install.ps1 | iex

On macOS or Linux:

curl -fsSL https://antigravity.google/cli/install.sh | bash

The command is agy.

What happened to Gemini CLI?

Google moved personal users to Antigravity CLI. Since 18 June 2026, Gemini CLI no longer serves requests for free use and for Google AI Pro and Ultra plans. It still works with a Gemini Code Assist Standard or Enterprise license, and with paid Gemini API keys.

Google says Antigravity CLI does not match Gemini CLI feature for feature yet. If you scripted Gemini CLI in CI, check Google’s migration notes before your pipeline breaks.

How do I keep an agent running when my connection drops?

A terminal agent lives as long as the terminal it runs in. Close the laptop lid during an SSH session, and the agent working on the server is killed mid-task. Run it inside tmux, which keeps the session alive on the server:

tmux new -s agent
claude

Detach with Ctrl+b then d, close the connection, and come back later with:

tmux attach -t agent

The agent kept working the whole time. If the session did end, Claude Code can pick up the most recent conversation in the project folder with claude -c, and Codex continues its last script run with codex exec resume --last.

Two settings matter inside tmux: before version 3.5, tmux delays every Esc key by half a second, which makes stopping an agent feel sluggish (see why Esc feels slow), and it keeps only 2,000 lines of scrollback by default, so long agent output scrolls out of reach. set -g history-limit 50000 in ~/.tmux.conf fixes the second.

What we learned building one

Contenox shipped a full-screen terminal client of its own, called beam: chat, plans, shell output and file edits in one scrollback, an approval card that stopped a risky call inline, a command palette, @ to address files. Three lessons came out of it:

  • The protocol matters more than the screen. Beam was a client for the Agent Client Protocol, so it barely knew which agent it talked to. Terminal, browser and editor clients all spoke the same protocol to the same agent.
  • The safety rules must not live in the terminal. Wherever beam enforced something itself, that rule only held while beam was running. A rule that disappears when you switch windows is not a rule. The agent has to enforce it, whatever client you use.
  • The terminal is great for people who already live there, and a wall for everyone else. That is why Contenox today is a desktop app: same agent, same rules, but with diffs, files and a terminal pane side by side for people who don’t think in shell commands.

If you are happy in a terminal, use a terminal agent. If you want the agent in a window instead, Contenox is a free, open-source desktop app, Windows first: open a project folder, say what you want, and watch and approve while the agent works. For scripts and CI it has a command line, contenox-runtime (install).

Related

Esc to close