loop_
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
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.
── 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.
Scheduled tasks run on an OS timer — launchd, systemd, or Task Scheduler — so they fire even when loop is closed. From scripts, loop background (alias loop goals) does the same.
── Goal mode
Different thing: /goal drives the current session autonomously until an adversarial verifier agrees the objective is actually met.
Esc pauses; pick it back up with /goal resume. Step caps and stalls auto-pause instead of burning tokens forever.
── Agents & subagents
- built-ins
defaultwith the full toolset,planas a read-only investigator, anddata-analystfor SQL-first work via/datasource. Tab on an empty prompt cycles them.- your own
- Build one with
/agents— custom system prompt, tool allowlist, optional pinned model. It registers as/<name>for one-shot use. - plans ship
- The plan agent treats a plan as a deliverable. When it's final the agent calls the
plantool, which ends the turn and renders the plan as markdown. Then you either hand it to an agent to implement, or keep refining it. - subagents
- The
tasktool 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
- models
- One TUI, many models. Switch with
/model, pin per-agent models with/scoped-models, tune reasoning with/thinking. - hooks
- Your existing
~/.claudehooks and plugins load as-is. Claude Code-compatible lifecycle hooks, so switching costs you nothing. - extend
- MCP servers over stdio and http/sse with OAuth included, plus a JS extension system for custom tools, providers, and middleware.
- scripting
- One-shot with
loop run "...", pipe from stdin, cap work with--max-steps, or drive it over JSON-RPC. - context
/compactsummarizes,/contextshows what's loaded,/memorykeeps durable facts, and queued messages run after the current turn.
── Commands
- sessions
/new/resume/session/name/export/share/compact/context- tree
/tree/fork/clone- models
/model/provider/thinking/scoped-models- automation
/background/goal/daemon/reminder/timer/recap- setup
/login/settings/mcp/extensions/hooks/bashdeny/doctor
── Providers
- xAI · Grok
- Anthropic
- OpenAI
- Google Gemini
- OpenRouter
- Vercel AI Gateway
- GitHub Copilot
- AWS Bedrock
- DeepSeek
- Mistral
- GLM
- Z.AI
- Groq
- Cerebras
- ZenMux
- Ollama · local
- Any OpenAI/Anthropic/Google-compatible gateway
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.
- subscriptions
- Already pay for SuperGrok? Sign in with it.
loop login xairuns 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). - copilot
- A GitHub Copilot subscription works the same way —
loop login github-copilotuses the device flow and bills against your existing plan. - local
- Or pay nothing: loop auto-detects a running Ollama daemon and uses your local models.
── 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.
Install it in one line.
Prebuilt binaries for darwin-x64, darwin-arm64, linux-x64, linux-arm64, and windows-x64. No Node, no build step.