Terminal coding agent. Bring your own model.
Prebuilt binaries, no Node required. Then loop login and loop. Full walkthrough in the docs.
Sessions are trees
refactor auth to use sessions ├─ Read src/auth/session.ts ├─ Edit src/auth/session.ts ├─ Bash bun test 712 pass │ ├─ fork "what if we move to postgres?" │ ├─ Edit src/db/schema.ts │ └─ abandoned · 12 messages summarized back into context │ └─ fork "keep sqlite, add WAL" ← leaf ├─ Edit src/db/sqlite.ts └─ Bash bun test 712 pass
Every entry has a parent, so a session is a tree rather than a transcript. Branch from any earlier message and keep both paths — when you leave a branch, loop offers to summarize it back so its context survives the switch. /fork copies a path into a new session; /clone duplicates the current one.
Background tasks
A background task is tied to a directory and runs headless, detached from your session. /background is the manager: add, edit, run now, or hand it to the scheduler.
/background + add background task… ├─ on demand no schedule — run it when you say so ├─ once 10m · 18:30 · 2026-06-15 09:00 └─ cron 0 9 * * 1-5 (weekdays at 9:00)
/daemon or loop goals daemon install.loop background (alias loop goals) does the same from scripts: list, add, rm, run, tick, daemon.Goal mode
Different thing: /goal drives the current session autonomously until an adversarial verifier agrees the objective is actually met.
/goal ship the auth refactor ├─ planner writes a frozen plan — no plan, no goal ├─ turn objective runs with the goal rules injected ├─ continue unchecked plan boxes → next directive └─ verifier read-only audit of the workspace └─ clean verdict → done · refuted → gaps feed the next turn
Esc pauses; pick it back up with /goal resume. Step caps and stalls auto-pause instead of burning tokens forever.
Agents & subagents
default with the full toolset, plan as a read-only investigator, and data-analyst for SQL-first work via /datasource. Tab on an empty prompt cycles them./agents — custom system prompt, tool allowlist, optional pinned model. It registers as /<name> for one-shot use.plan tool, which ends the turn and renders the plan as markdown. Then you either hand it to an agent to implement, or keep refining it.task tool forks the current agent into a fresh context window. Activity streams live in the task box; only the final report enters your context.What else
/model, pin per-agent models with /scoped-models, tune reasoning with /thinking.~/.claude hooks and plugins load as-is. Claude Code-compatible lifecycle hooks, so switching costs you nothing.lsp extension and type errors come back with the edit that caused them, plus an lsp tool for definitions, references and call hierarchy. 37 languages — TypeScript needs nothing installed.loop run "...", pipe from stdin, cap work with --max-steps, or drive it over JSON-RPC./compact summarizes, /context shows what's loaded, /memory keeps durable facts, and queued messages run after the current turn.Commands
loop interactive TUI loop run "explain this repo" one-shot loop login [provider] auth loop sessions list sessions in cwd loop background <cmd> list, add, rm, run, daemon loop mcp <cmd> add, list, remove, login loop extensions installed JS extensions loop models list the catalog loop cost audit verify the cost ledger loop upgrade self-update loop rpc [--socket] JSON-RPC
/new /resume /session /name /export /import /share /compact /context/tree /fork /clone/model /provider /thinking /scoped-models/background /goal /daemon /reminder /timer /recap/login /settings /mcp /extensions /hooks /bashdeny /doctorProviders
Bring your own key, sign in with OAuth, or point loop at a custom gateway like Bifrost or LiteLLM. Six auth methods: API key, bearer token, OAuth/SSO, environment variable, key-helper command, or headers only. Bedrock and Ollama are auto-detected.
loop login xai runs an OAuth flow straight into your xAI plan — no API key to paste, no per-token bill. Grok is the default model (xai/grok-build-0.1).loop login github-copilot uses the device flow and bills against your existing plan.Coming from Gemini CLI
Gemini CLI stopped serving individual accounts on 18 June 2026, and its replacement is closed source.
loop is open source, installs in one command, and still runs Gemini models with your own API key — alongside Grok, Claude, GPT-5, local Ollama models, and anything else you already pay for.
Prebuilt binaries for darwin-x64, darwin-arm64, linux-x64, linux-arm64, and windows-x64. No Node, no build step.