glossary
what is an agent loop?
TL;DR
An agent loop is one AI agent managing your other agents for you, so you stop switching terminals and copying results around. You tell it what needs doing; it creates a workspace per feature, starts agents, checks their progress and tells you when work is ready for review. Pane gives that loop agent what it needs through the runpane CLI and its MCP server, and the loop agent can be Claude Code, Codex or any CLI agent.
An agent loop is when one AI agent manages other agents for you. Instead of you switching between terminals, checking on each agent, and copy-pasting results around, one agent does all of that automatically.
what it looks like without a loop
Without a loop, you are the loop: switching, checking and copying by hand.
You open a terminal. Start an agent. Give it a task. Switch to another terminal. Start another agent. Give it a different task. Now you're alt-tabbing between them, checking if either one is done, copying review feedback from one into the other, and trying to keep track of what's going on. With three or four agents, it's chaos.
what it looks like with a loop
With a loop, you talk to one agent and review when work is ready.
You talk to one agent. You say something like: "There are three issues that need work. Create a pane for each one, start Codex in each, and tell me when they're ready for review."
The loop agent handles the rest. It creates the workspaces, starts the agents, checks on their progress, and reports back. You review when it's ready, not when you remember to check.
how it works, step by step
Check for work, make a pane, start an agent, watch it, report back.
- 1The loop agent checks for work. It looks at GitHub issues, PRs, or whatever you told it to watch.
- 2It creates a pane for each feature. Each pane is an isolated workspace with its own branch (a git worktree), so agents can't overwrite each other.
- 3It starts an agent in each pane. Could be Codex, Claude Code, or anything that runs in a terminal.
- 4It checks on them. Reads their terminal output, answers permission prompts, sends follow-up input if needed.
- 5It reports back to you. Tells you what's done, what needs review, and what's still running.
what pane provides
Pane supplies the hands: panes, agents, terminal output and input.
Pane is the workspace the loop agent controls, and it also ships two loop agents of its own, Pane Chat and Sessions. Either way, the loop agent gets these commands:
- → Create panes with isolated git worktrees
- → Start agents in those panes
- → Read terminal output to check what's happening
- → Send input to answer prompts or continue work
- → Wait for states like "ready" or "idle"
who runs the loop?
Any agent or script that can run a command can run the loop.
Anything that can run terminal commands: Codex, Claude Code, a bash script, a cron job or a GitHub Action. The loop runner uses Pane's runpane CLI to control the workspace. Pane Chat and Sessions are the built-in versions, already wired up inside Pane, and an opt-in setting lets them resume interrupted turns so a loop can keep running while you're away.
related docs
- → Set Up Your First Agent Loop - the practical guide
- → Agent Loops Docs - the full command reference
- → Pane Loops - run your loop agent on a schedule
- → Pane Chat - the built-in orchestrator
- → runpane CLI - the commands agents use
Sources
- Corrections
- If anything here is wrong or out of date, tell us and we'll fix it and update the date at the top. Open an issue on GitHub
- Sources
frequently asked questions
By Parsa Khazaeepoul, co-founder of Pane. .