Goal - Chat - CLI - Docs - Kiro
https://kiro.dev/docs/cli/chat/goal/ • 199 KB fetched Open original page
Goal - Chat - CLI - Docs - Kiro
Loading image... Product
* About Kiro
* IDE
* CLI
* Web
* Mobile
* Crew
* Pricing
* Downloads
For
* Enterprise
* Startups
* Students
Community
* Overview
* Ambassadors
* Discord
* Events
* Powers
* Shop
* Showcase
Resources
* Docs
* Blog
* Changelog
* FAQs
* Report a bug
* Suggest an idea
* Billing support
Social
*
*
*
*
*
*
*
English
Site Terms License Responsible AI Policy Legal Privacy Policy Cookie Preferences English
Loading image...
* Apps
* CLI
* Web
* Enterprise
* Pricing
* Docs
* Community
* Resources
SIGN IN DOWNLOADS
Loading image...
Get Started
Installation Authentication Your first project
Models
Overview Available models Reasoning effort
Features
How Kiro works Specs
Steering Hooks
MCP
Permissions Custom agents
Agent Skills Powers
Cloud sessions Compaction Kiroignore Checkpoints and rewind Built-in tools
Configuration scopes
IDE 1.x
What's new in 1.0
Setup & First Run Editor
Chat
Experimental
Troubleshooting 0.x reference
CLI
What's new in 3.0
Setup & First Run Terminal UI
Chat
Session management
Goal
Queue steering
In-session settings
Prompts
File references
Context management
Responding to messages
Working with Git
Images
Custom diff tools
Voice mode Headless mode ACP Auto complete Experimental
2.x reference
Crew
Quick start Installation Running 24/7 Chat
Agent Capabilities
Features
Interfaces
Apps
System & storage Configuration Security Troubleshooting
Web
Setup & First Run Identity Center Connect your repositories
Working with the agent
Autonomous mode Automations Memory Configuration Sync Sandbox
Mobile - Preview
Overview
Commands and Reference
CLI commands Slash commands Built-in tools Exit codes Settings
Billing
Overview Managing your subscription Upgrading your plan Downgrading your plan Cancelling your plan Purchasing add-on credits Managing your payments Managing usage notifications Managing your taxes Contacting billing support Deleting your account Related questions
Enterprise
Concepts Onboarding quickstart Connecting your identity provider
Deployment options Subscribe your team Manage subscriptions Governance
Monitor and track
Settings Managed updates Billing IAM Supported regions
Privacy and Security
Overview Data protection Code references Compliance validation Infrastructure security IAM permissions Firewalls, proxies, and data perimeters VPC endpoints (AWS PrivateLink)
Guides
Overview Language support
Learn by playing
Migration
Migrating from Q Developer Migrating from VSCode Upgrading from Q CLI
* Docs
*
* CLI
*
* Chat
*
* Goal
Copy page View as Markdown
Goal
Copy page View as Markdown
The /goal command launches a goal-driven agent loop where Kiro works autonomously toward an objective you define. Unlike a regular prompt, the agent cycles through implementation and self-verification, only marking the task complete when acceptance criteria are met. By default, the agent runs up to 5 iterations — increase this with --max :
bash
# Default: 5 iterations
/goal refactor the auth module to use JWT tokens and ensure all tests pass
# Allow more iterations for complex tasks
/goal --max 10 migrate the entire test suite from Jest to Vitest
How it works
When you set a goal, the agent enters an iterative loop:
* Plans the steps needed to accomplish the objective
* Implements changes
* Verifies the result against the goal's acceptance criteria
* If verification fails, iterates with corrections
* Marks the goal complete once all criteria pass
This cycle continues until the agent confirms the work is done or you cancel the goal.
The agent derives acceptance criteria from your goal statement. Be explicit about what "done" looks like — "all tests pass" or "no TypeScript errors" gives the agent a concrete verification target. Vague goals like "improve the code" may cause the agent to iterate longer than necessary.
bash
# Set a goal with clear acceptance criteria
/goal refactor the auth module to use JWT tokens and ensure all tests pass
# Cancel an active goal
/goal clear
Info
The agent keeps iterating until it verifies success. For complex goals, this may take several turns of autonomous work. You can monitor progress in real time as the agent works.
When to use goals
Goals work best for multi-step tasks where you want autonomous execution with a built-in quality gate:
* Refactoring with constraints — "migrate all API routes from Express to Hono and make sure the test suite passes"
* Bug fixing with verification — "fix the race condition in the worker pool and add a regression test"
* Code generation with criteria — "add input validation to all form components and ensure accessibility tests pass"
* Multi-file changes — "rename the User model to Account across the entire codebase with no broken imports"
For simple, single-step tasks where you already know what you want, a regular prompt is faster. Use /goal when you want the agent to own the verification step.
Managing an active goal
While a goal is running, you have two options:
* Steer it — use queue steering (Ctrl+S) to send a mid-loop correction without cancelling
* Cancel it — run /goal clear to stop the loop and return to standard interactive mode
bash
/goal clear
File changes already made remain on disk. Use your version control system to revert if needed.
Limits and safeguards
The agent respects the same turn limits and context window constraints as regular prompts. If it exhausts its context or hits a repeated failure pattern, it stops and reports what it tried. You can also use queue steering to nudge the agent mid-loop without cancelling the goal entirely.
Related
* Queue steering — redirect the agent mid-turn without cancelling
* Effort — control reasoning depth for the model
* Rewind — fork a conversation at an earlier turn
Page updated: August 4, 2026
Session management
Queue steering
Links found on this page
- About Kiro [direct]
- IDE [direct]
- CLI [direct]
- Web [direct]
- Mobile [direct]
- Crew [direct]
- Pricing [direct]
- Downloads [direct]
- Enterprise [direct]
- Startups [direct]
- Students [direct]
- Overview [direct]
- Ambassadors [direct]
- Discord [direct]
- Events [direct]
- Powers [direct]
- Shop [direct]
- Showcase [direct]
- Docs [direct]
- Blog [direct]
- Changelog [direct]
- FAQs [direct]
- Report a bug [direct]
- Suggest an idea [direct]
- Billing support [direct]
- Site Terms [direct]
- License [direct]
- Responsible AI Policy [direct]
- Legal [direct]
- Privacy Policy [direct]
- Cookie Preferences [direct]
- Loading image... [direct]
- SIGN IN [direct]
- Installation [direct]
- Authentication [direct]
- Your first project [direct]
- Overview [direct]
- Available models [direct]
- Reasoning effort [direct]
- How Kiro works [direct]
- Specs [direct]
- Steering [direct]
- Hooks [direct]
- MCP [direct]
- Permissions [direct]
- Custom agents [direct]
- Agent Skills [direct]
- Powers [direct]
- Cloud sessions [direct]
- Compaction [direct]
- Kiroignore [direct]
- Checkpoints and rewind [direct]
- Built-in tools [direct]
- Configuration scopes [direct]
- What's new in 1.0 [direct]
- Setup & First Run [direct]
- Editor [direct]
- Chat [direct]
- Experimental [direct]
- Troubleshooting [direct]
- 0.x reference [direct]
- What's new in 3.0 [direct]
- Setup & First Run [direct]
- Terminal UI [direct]
- Chat [direct]
- Session management [direct]
- Queue steering [direct]
- In-session settings [direct]
- Prompts [direct]
- File references [direct]
- Context management [direct]
- Responding to messages [direct]
- Working with Git [direct]
- Images [direct]
- Custom diff tools [direct]
- Voice mode [direct]
- Headless mode [direct]
- ACP [direct]
- Auto complete [direct]
- Experimental [direct]
|
|