Standard Workflow: Spawn → Work → PR → CI → Review → Merge
This is the most common workflow for feature development:spawning → workinggh pr createreview_pending → changes_requestedreview.changes_requestedAuto-Reaction Workflows
Reactions automate common interventions, reducing human toil.CI Failure Auto-Fix
Trigger:ci.failing eventConfig key:
ci-failedDefault: Enabled with 2 retries
Configuration
Configuration
- Lifecycle Manager detects
ci_failedstatus - SCM fetches CI check details
- Runtime sends failure logs to agent
- Agent analyzes logs, fixes issue, pushes commit
- Lifecycle Manager detects PR updated →
pr_open - If CI fails again, repeat (up to
retriestimes) - If all retries exhausted, escalate to human
The agent sees actual CI logs and error messages, not just “tests failed.” This gives it enough context to diagnose and fix most issues autonomously.
Review Comments Auto-Response
Trigger:review.changes_requested eventConfig key:
changes-requestedDefault: Enabled with escalation
Configuration
Configuration
- Lifecycle Manager detects
changes_requestedstatus - SCM fetches review comments (including line numbers, file paths)
- Runtime sends comments to agent
- Agent reads feedback, updates code, pushes commits
- Lifecycle Manager detects PR updated →
pr_open - PR goes back to review
- If unresolved after 1 hour, escalate to human
Automated Review Comments (Bug Bots)
Trigger:automated_review.found eventConfig key:
bugbot-commentsDefault: Enabled
Configuration
Configuration
- SCM detects automated comments (bots, linters, security scanners)
- Event:
automated_review.found - Runtime sends bot feedback to agent
- Agent fixes issues flagged by bots
- Agent pushes fixes
- GitHub CodeQL
- Dependabot
- ESLint bot
- Security scanners
Agent Stuck Detection
Trigger: Agent idle beyondreadyThresholdMs (default: 5 min)Config key:
agent-stuckDefault: Notify after 10 min
Configuration
Configuration
- Lifecycle Manager polls sessions every 30s
- Agent plugin detects
idleactivity (last action > 5 min ago) - If idle for 10 minutes total, event:
session.stuck - Notifier sends urgent notification
- Human attaches to session or sends guidance
Agent Needs Input
Trigger: Agent waiting for user responseConfig key:
agent-needs-inputDefault: Immediate notification
Configuration
Configuration
- Agent plugin detects
waiting_inputactivity state - Lifecycle Manager updates status to
needs_input - Event:
session.needs_input - Notifier delivers urgent notification
- Human responds:
ao send session-1 "Yes, proceed" - Runtime delivers message to agent
Merge Conflict Detection
Trigger: PR has merge conflictsConfig key:
merge-conflictsDefault: Send to agent
Configuration
Configuration
- SCM checks merge readiness
- If
noConflicts: false, event:merge.conflicts - Runtime notifies agent
- Agent pulls base branch, resolves conflicts, pushes
Multi-Project Workflows
Orchestrate work across multiple repositories.Cross-Repo Feature Development
Scenario: Feature requires changes tobackend and frontend.
Parallel Issue Batch
Scenario: Clear backlog of 10 similar issues.- 10 agents work in parallel
- Each in its own worktree + tmux session
- Each creates its own PR
- Auto-reactions handle CI/review for all
- You review and merge when ready
Custom Workflows
Exploration Workflow (No Issue)
Sometimes you want an agent to explore without a specific issue:- No issue ID → agent gets free-form prompt
- Agent explores codebase
- Agent may or may not create PR
- Session ends in
donestate (notmerged)
Orchestrator-Managed Workflow
For complex workflows, spawn an orchestrator agent that manages other agents:- Monitors project state
- Spawns child agents for issues
- Coordinates multi-agent workflows
- Makes decisions about priorities
- Reports summary to human
Review-Only Workflow
Agent reviews code without making changes:- Agent fetches PR diff
- Agent analyzes code
- Agent posts review comments
- Session ends (no commits, no new PR)
Incremental Workflow
Agent works on large task incrementally:Workflow Best Practices
Reaction Configuration
Start conservative:Notification Routing
Route notifications by priority:Session Monitoring
Use the dashboard for overview:- Desktop: Immediate attention (urgent/action)
- Slack: Team visibility (action/warning)
- Webhook: Integration with your tools (all priorities)
Agent Selection
General purpose:claude-code (default)
- Best for most tasks
- Session resume support
- Good at following complex instructions
codex
- Quick responses
- Good for small fixes
aider
- Git-aware
- Good at incremental changes
Workspace Strategy
Most cases:worktree (default)
- Shares git history
- Fast and efficient
- Agents see each other’s commits
clone
- Separate git state
- Higher disk usage
- Use when agents might interfere
Cleanup Cadence
Clean up regularly to free resources:- After PRs merge
- After issues close
- Weekly for stale sessions
- Sessions in
pr_open(may need revival) - Sessions in
needs_input(waiting for you) - Sessions with unresolved work
Troubleshooting Workflows
Agent Not Creating PR
Symptoms: Session stuck inworking, no PR detected.
Causes:
- Agent hasn’t finished work yet (check activity)
- Agent lacks GitHub permissions (
gh auth login) - Workspace hooks not set up (PR not written to metadata)
CI Keeps Failing
Symptoms: Session cyclespr_open → ci_failed repeatedly.
Causes:
- Flaky tests (non-deterministic failures)
- Agent misunderstanding failure logs
- Retries exhausted
Review Comments Not Addressed
Symptoms: Session stays inchanges_requested.
Causes:
- Comments require human judgment
- Agent doesn’t understand feedback
- Escalation threshold not reached
Agent Stuck
Symptoms: Session instuck state, no activity.
Causes:
- Agent waiting for external resource
- Agent confused about next step
- Agent process died
Next Steps
Sessions
Deep dive into session lifecycle and management
Reactions
Configure automatic reactions for your workflows
Monitoring
Set up monitoring and notifications
