Greg — Orquestrador de Agentes Claude em Paralelo
elmerescandon/greg
Paraleliza teams de Claude Code com workspace compartilhada e coordenação automática
Ver no GitHubAgent multi-agente em Go que orquestra times de Claude Code trabalhando em paralelo em uma workspace compartilhada. Cada agente especializado executa em sessão tmux isolada, lê outputs dos colegas em tempo real, e um agente diretor coordena progresso, desbloqueia impasses e sintetiza resultados. Ideal para tarefas complexas que extrapolam limite de contexto de uma sessão única.
Instalação
npx convez-ai elmerescandon/greg1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Relatórios de pesquisa multi-perspectiva (regulação, mercado, técnico)
- Auditorias de codebase com especialistas em diferentes módulos
- Migrações multi-arquivo com agentes focados em padrões específicos
- Análise paralela de documentação complexa por domínio
Veredito

Greg resolve um problema real: sessões Claude isoladas não escalam em tarefas grandes. A arquitetura de agentes paralelos com workspace compartilhada e coordenador automático é sólida e bem pensada. Terminal-native sem dependências externas é força; falta documentação de edge cases e tuning de timeouts.
README
A tradução para o português deste README ainda está na fila.
greg
Orchestrate teams of Claude Code agents that collaborate in parallel.
The problem
A single Claude Code session hits its limits fast on big tasks — research reports, codebase audits, multi-file migrations. You run out of context, wait too long, or end up copy-pasting outputs between sessions manually. That doesn't scale.
How greg solves it
greg spawns multiple Claude Code agents that work in parallel on a shared workspace. Each agent owns a perspective, writes progressively, and can read what the others are producing in real time.
- Parallel agents — split a task across specialists that run simultaneously, each in its own tmux session
- Shared workspace — agents read and reference each other's outputs as they write; no copy-paste, no handoffs
- Automatic director — a coordinator agent is injected into every task to monitor progress, unblock teammates, and produce synthesis notes
- Monitor without interrupting —
greg peekshows you what any agent (or all agents in a task) is doing right now, without attaching to their session - Fault tolerant — if an agent's session crashes before writing
done, the coordinator moves it toreviewafter 120 seconds so the director can verify before closing - Terminal-native — bash CLI + Go TUI, no external services, no API keys beyond Claude Code itself
Quick start
# Launch a 3-agent research task
greg task run \
--goal "Research report on the state of AI regulation worldwide" \
--agent "americas:Cover US, Canada, Brazil, and LATAM regulations. Skip Europe and Asia." \
--agent "europe:Cover EU AI Act, UK, and European national frameworks. Skip other regions." \
--agent "asia:Cover China, Japan, South Korea, India, and Singapore. Skip other regions."
# A director agent is added automatically to coordinate the team.
# All 4 agents start working in parallel immediately.
# Check what they're doing
greg peek mtask-xxxxxxxx
# ━━━ director (greg-a1b2c3d4) ━━━
# ⏺ Reading americas output... cross-referencing with europe findings on
# bilateral AI safety agreements.
# ✻ Brewed for 3m 12s
#
# ━━━ americas (greg-e5f6a7b8) ━━━
# ⏺ Writing section on Brazil's AI regulatory framework...
# ✻ Crunched for 4m 5s
# ...
# When all agents finish, the director leaves synthesis notes:
cat ~/.greg/multi-tasks/mtask-xxxxxxxx/workspace/director-synthesis-notes.md
CLI reference
Sessions
greg spawn # new session in $GREG_VAULT
greg spawn --name "refactor" --prompt "refactor auth module"
greg list # sessions, tasks, and recent history
greg peek <session-id> [-n 50] # last N lines from a session (default 30)
greg attach <session-id> # attach to tmux session
greg kill <session-id> # stop and archive
greg resume <session-id> # resume a finished session
greg history [--limit N] # show last N finished sessions
greg schedule --prompt "..." --at "2026-07-01 09:00" # one-shot scheduled task
greg cancel <task-id> # cancel a scheduled task
Multi-agent tasks
greg task run --goal "..." --agent "id:role" [--agent ...] [--criteria-file "id:/path/to/criteria.md" ...] [--preset coding|research] [--model alias|id]
greg task status <task-id> # per-agent status, coordinator health, tmux state
greg task list # all tasks with statuses
greg peek <task-id> [-n 30] # tail all agents at once
greg task message <task-id> "redirect X" # send a message to the director
greg task done <task-id> <agent-id> # force-mark an agent as done
greg task close <task-id> # close task (requires all agents done)
greg task resume <task-id> <agent-id> # resume a finished agent with full context
# Agent messaging (used inside agent sessions, via skills)
greg send-msg --from <id> --to <id> --workspace <path> "message" # send with timestamp
greg wait-msg --agent <id> --workspace <path> [--timeout <secs>] # block until message arrives
greg check-msgs --agent <id> --workspace <path> # drain unread messages
Model aliases
--model accepts short aliases or full IDs:
| Alias | Model ID |
|---|---|
opus | claude-opus-4-8 |
sonnet | claude-sonnet-4-6 |
haiku | claude-haiku-4-5-20251001 |
How multi-agent tasks work
~/.greg/multi-tasks/mtask-xxxxxxxx/
manifest.json # task metadata, agent roles, session IDs
workspace/
director.md # director's coordination log
director-synthesis-notes.md # final consolidated output
americas.md # each agent writes here progressively
europe.md
asia.md
messages/
americas→director.md # agents message each other
director→americas.md
status/
director.status # working | waiting | needs-help | done
americas.status # working | waiting | needs-help | review | done
...
greg task runspawns all agents in parallel, each in its own tmux session- A director agent is auto-injected to coordinate, cross-pollinate, and synthesize
- Agents write to
workspace/<agent-id>.mdprogressively — teammates can read in real time - Agents communicate via
greg send-msg— each message is appended with a timestamp;greg wait-msgblocks deterministically onfswatchuntil a reply arrives;greg check-msgsdrains unread messages - A background coordinator process polls
status/files every 15 seconds - When a specialist finishes, it moves to
review; the director verifies against<agent-id>.criteria.mdand writes a verdict to<agent-id>.review.md, then moves the agent todone(or back toworkingwith gaps) - When all agents write
done, the coordinator closes the task
Setup
Requirements
- Claude Code (
claudein PATH) - tmux
- Go 1.22+ (for the TUI)
- jq
- fswatch (optional — enables event-driven
wait-msg; falls back to 2s polling)
Install
git clone https://github.com/elmerescandon/greg
cd greg
# Add CLI to PATH
ln -s "$(pwd)/cli/greg" ~/.local/bin/greg
# Set your default working directory
echo 'export GREG_VAULT="/path/to/your/project"' >> ~/.zshrc
source ~/.zshrc
TUI
cd ui
go build -o greg-ui .
ln -s "$(pwd)/greg-ui" ~/.local/bin/greg-ui
The TUI is a Go/bubbletea terminal app with four views:
| Tab | Key | Description |
|---|---|---|
| Chat | Ctrl+1 | Session sidebar + Claude output panel |
| Agente | Ctrl+2 / Ctrl+Space | Multi-agent task browser with Command Center |
| Métricas | Ctrl+3 | Usage charts |
| Config | Ctrl+4 | Persistent preferences |
Chat view (Ctrl+1)
The main interface. Left sidebar lists standalone sessions; right panel shows the active Claude output.
Sidebar navigation
| Key | Action |
|---|---|
Shift+↑/↓ | Navigate sessions |
Shift+Enter | Open selected session |
Chat panel
| Key | Action |
|---|---|
Enter | Send message |
Alt+Enter | Insert newline |
↑/↓ | Scroll output |
PgUp/PgDn | Scroll by page |
Alt+↑/↓ | Navigate input history |
Ctrl+K | Pre-fill /compact |
Ctrl+V | Paste from clipboard |
Agente view (Ctrl+2)
Task list with status, ID, creation date, and goal. Coding tasks are marked with ⌨.
| Key | Action |
|---|---|
↑/↓ | Navigate tasks |
PgUp/PgDn | Scroll task list |
Enter | Open Command Center for selected task |
x | Close task (if all agents are done) |
Command Center — opened with Enter on a task:
Shows a table of all agents (status, messages in/out), workspace files, and message channels.
| Key | Action |
|---|---|
↑/↓ | Navigate agents / files / messages |
Enter | Open selected file (glamour-rendered) or peek agent's tmux session |
Esc | Go back |
File / tmux peek sub-views
| Key | Action |
|---|---|
↑/↓, PgUp/PgDn | Scroll |
Esc | Go back |
Config view (Ctrl+4)
Preferences are persisted to ~/.config/greg/config.json.
| Setting | Options | Default |
|---|---|---|
| Tema | Dark mode / Light mode | Dark |
| Modelo por defecto | opus / sonnet / haiku | sonnet-4-6 |
| Esfuerzo por defecto | low / medium / high / xhigh / max | high |
| Umbral compactación | 70–95% | 90% |
| Auto-compact | activado / desactivado | desactivado |
| Timeout idle | nunca / 4h / 8h / 24h | nunca |
Navigate with ↑/↓, change values with ←/→.
Global keys
| Key | Action |
|---|---|
Ctrl+T | New session tab |
Ctrl+W | Close current tab |
Ctrl+Shift+←/→ | Switch between tabs |
Ctrl+Q | Quit |
Presets
--preset coding
Creates an isolated git worktree at /tmp/greg-worktree-<task_id> and gives each agent role a specific skill:
- Specialists receive
coding/workflow— atomic commits with conventional format, build verification per stack, no push - Director receives
coding/director— waits for all specialists to finish, runs integration build, resolves conflicts, does the singlegit pushand creates the consolidated PR withgh pr create
The director is the only agent that pushes and opens a PR. Specialists only commit.
--preset research
Detects agent role by keyword (collector vs analyzer) and injects role-specific methodology:
- Collector agents gather raw evidence only — structured output with source, date, quality flag, content, and contradictions
- Analyzer agents work exclusively from workspace files to prevent anchoring bias; produce explicit confidence levels and bias detection checklist
Skills
greg injects prompt templates (skills) into each agent to define their behavior.
Agent templates — injected by the CLI into every task:
| File | Purpose |
|---|---|
agents/mailbox.md | Workspace and messaging protocol — injected into every agent; exposes send-msg, wait-msg, check-msgs |
agents/director.md | Director: coordinate team, cross-pollinate findings, write synthesis |
agents/teammate.md | Specialist: progressive writing, proactive reading, status protocol |
Invocable skills — used by humans via /skill-name, also injected by presets:
| Skill path | Invocation | Purpose |
|---|---|---|
coding/workflow/SKILL.md | --preset coding (specialists) | Git workflow, build/test checklist, atomic commits |
coding/director/SKILL.md | --preset coding (director) | Integration build, push, and consolidated PR |
coding/issue/SKILL.md | /greg-issue | Build a well-defined issue before handing work to a coding agent |
research/collector/SKILL.md | --preset research (collectors) | Raw evidence gathering protocol |
research/analyzer/SKILL.md | --preset research (analyzers) | Workspace-only analysis, bias detection, confidence levels |
human/greg-task/SKILL.md | /greg-task | Design and launch a multi-agent task |
human/greg-learn/SKILL.md | /greg-learn | Consolidate learnings from a conversation into persistent memory |
human/greg-revise/SKILL.md | /greg-revise | Revise and improve written content |
Changelog
See CHANGELOG.md.