A lazygit-inspired TUI for orchestrating coding agents across git worktrees.
You have a big feature to ship.
You crack open three terminals, cd into three worktrees, and spawn three coding agents.
Ten minutes later you're alt-tabbing through a mess of tabs, trying to remember which agent finished, which one is stuck waiting for approval, and which one silently errored out five minutes ago.
lazyagent does for coding agents what lazygit did for git: one TUI, full visibility, zero tab-juggling.
- Multi-agent orchestration — spawn, monitor, and stop agents across git worktrees from a single screen
- Real-time provider-aware status — know instantly if an agent is running, waiting for approval, idle, or done
- Multi-provider support — Claude, Codex, and Gemini out of the box, configurable per repo
- Embedded terminal — drop into any worktree's shell without leaving the TUI
- Inline diff view — review working-tree changes (tracked + untracked) right next to agent output
- PR / CI at a glance — pull request state, review status, and CI checks per worktree (via
gh)
Prerequisites: Python 3.10+, git, and at least one agent CLI (
claude,codex, orgemini).
uv tool install lazyagentpip install lazyagentOptional: install the GitHub CLI (
gh) to enable PR and CI status features.
cd your-repo
lazyagentFrom there:
- Create worktrees — press
cto branch off parallel workstreams - Spawn agents — press
sto launch a coding agent in the selected worktree - Monitor — watch agent output stream in real time; status badges update automatically
- Interact — press
Ctrl+Lto drop into the embedded terminal for hands-on work - Review — press
Ctrl+Dto inspect diffs before committing - Clean up — press
dto remove worktrees when done
By default lazyagent launches claude. Set provider = "codex" or provider = "gemini" in .lazyagent.toml to switch.
lazyagent ships an MCP server that exposes its worktree and agent tools (list_worktrees, spawn_agent, read_agent_output, …) to a standalone claude session — useful when you want claude running outside lazyagent's TUI to drive a lazyagent instance you have running elsewhere.
Agents that lazyagent itself spawns (worktree agents and the orchestrator) get the MCP server wired up automatically. The setup below is only needed for
claudesessions you start by hand in other projects.
Register it once at user scope so claude finds it from any directory:
claude mcp add --scope user lazyagent $(which python3) -m lazyagent.mcp_serverIf claude mcp add swallows -m as one of its own flags, separate args with --:
claude mcp add --scope user lazyagent $(which python3) -- -m lazyagent.mcp_serverVerify from a directory outside the lazyagent repo:
cd /tmp && claude mcp list | grep lazyagentInterpreter caveat: the python you register must be the one that pip-installed lazyagent. If
python3 -m lazyagent.mcp_serverfails withNo module named 'lazyagent', substitute the right interpreter (e.g./usr/bin/python3.11, yourpipxenv's python, oruv tool dir lazyagent's python) and re-runclaude mcp add. The MCP tools talk to a running lazyagent over a Unix socket under/tmp/lazyagent-<pid>/and will returnNo running lazyagent instance foundif no lazyagent is running.
Create, remove, and navigate git worktrees without leaving the TUI. Each worktree gets its own agent, terminal, and diff view — perfect for parallelizing tasks across branches.
lazyagent doesn't just scrape terminal output. It taps into each provider's native signals for high-confidence state detection:
| Provider | Signal Source | What It Catches |
|---|---|---|
| Claude | Hooks (JSONL logs) | Permission prompts, idle states, task completion |
| Codex | App Server Events (JSON-RPC) | Turns, approval requests, failures |
| Gemini | Telemetry (file export) + screen detection | Activity, session boundaries |
Statuses are normalized into a clear lifecycle:
| Status | Color | Meaning |
|---|---|---|
running |
green | Actively working or calling tools |
approving |
yellow | Waiting for user approval |
waiting |
yellow | Idle or waiting for input |
completed |
cyan | Task finished |
failed |
red | Error or turn failure |
Press Ctrl+D to see working-tree changes (both tracked and untracked files) rendered inline. Review what your agents have done before committing.
When the gh CLI is available, lazyagent shows pull request state, review status, and CI check results per worktree — no browser needed.
Press Ctrl+L to open a full terminal session inside any worktree. Run tests, inspect files, or interact with agents directly — then jump back to the overview.
Switch between claude, codex, and gemini globally or per repository via .lazyagent.toml. Custom worktree create/remove commands are also supported.
Keybindings
| Key | Action |
|---|---|
j / k |
Move down / up in sidebar |
Ctrl+K |
Focus sidebar |
Ctrl+J |
Focus agent pane |
Ctrl+D |
Focus diff pane |
Ctrl+L |
Focus terminal pane |
s |
Spawn agent in selected worktree |
x |
Stop agent in selected worktree |
c |
Create new worktree |
d |
Remove selected worktree |
r |
Refresh worktree list |
PageUp / PageDown |
Scroll terminal history |
? |
Show help |
q |
Quit |
Create a .lazyagent.toml in your repository root:
# Branch to base new worktrees on (default: "master")
default_branch = "main"
[agent]
# Agent CLI to launch: "claude" (default), "codex", or "gemini"
provider = "claude"
[worktree]
# Custom command templates for worktree management
# Available placeholders: {branch}, {name}, {base}, {path}, {repo}
create = "git worktree add -b {branch} ../{name} {base}"
remove = "git worktree remove ../{name}"git clone https://github.com/gioalcamofly/lazyagent.git
cd lazyagent
uv sync --group dev
uv run pytest