Autopilot is a structured execution mode for long-running tasks. You describe an idea, and Nyzhi works through it in phases: expanding requirements, planning, implementing, testing, and validating.
State is persisted per project, so you can pause and resume at any point.
How It Works
Autopilot follows a fixed phase sequence:
expansion → planning → execution → qa → validation → complete
| Phase | What happens |
|---|---|
| Expansion | Breaks your idea into concrete requirements |
| Planning | Generates a step-by-step implementation plan |
| Execution | Implements the plan using tools |
| QA | Runs tests and checks for regressions |
| Validation | Final review — confirms everything works |
| Complete | All phases passed |
Each phase has a dedicated prompt builder that structures the agent’s work.
Starting Autopilot
From the TUI:
/autopilot Add rate limiting to the API — per-user, 100 req/min, with Redis
Nyzhi starts at the expansion phase and works through each phase automatically.
Checking Status
/autopilot
Prints the current phase and a summary of progress, including:
- The original idea
- Requirements (from expansion)
- Plan (from planning)
- Execution log
- QA results
- Validation report
Cancelling and Clearing
/autopilot cancel
Marks the current phase as cancelled. You can resume from where you left off or start over.
/autopilot clear
Deletes all persisted state. Use this to start fresh.
State Persistence
Autopilot state is saved to:
<project>/.nyzhi/state/autopilot.json
The state includes everything needed to resume:
{
"idea": "Add rate limiting to the API",
"phase": "execution",
"requirements": ["Per-user limits", "Redis backend", "..."],
"plan": "1. Add redis dependency\n2. ...",
"execution_log": ["Created rate_limiter.rs", "..."],
"qa_results": null,
"validation_report": null
}
Phase Details
Expansion
The agent analyzes your idea and produces a structured list of requirements. It considers:
- What needs to change
- Edge cases and constraints
- Dependencies on existing code
- Testing strategy
Planning
Using the requirements, the agent creates a concrete implementation plan with ordered steps. Each step references specific files and changes.
Execution
The agent works through the plan step by step, using its full tool inventory (read, write, edit, bash, git, etc.). Progress is logged.
QA
After implementation, the agent runs verification checks — tests, type checks, linting — and reports results. If checks fail, it may iterate.
Validation
Final review pass. The agent confirms the implementation matches the original requirements and that all checks pass.
Tips
- Be specific — “Add rate limiting” works, but “Add per-user rate limiting with Redis, 100 req/min, return 429 with Retry-After header” works much better
- Check progress — run
/autopilotperiodically to see where things stand - Cancel early — if the expansion or plan looks wrong, cancel and refine your idea
- Review before shipping — autopilot is powerful but always review the final result, especially for production changes
Under the Hood
Autopilot uses the standard agent and tool runtime — it’s not a separate execution engine. Each phase is orchestrated through structured prompts and persisted state. The agent has access to all the same tools and capabilities as a regular Nyzhi session.
Next Steps
- Teams — multi-agent collaboration
- Verification — configuring automated checks
- Hooks — trigger actions on task completion