Loading image...Kiro

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

Site TermsLicenseResponsible AI PolicyLegalPrivacy PolicyCookie Preferences
Loading image...Kiro
  • CLI
  • Web
  • Enterprise
  • Pricing
  • Docs
SIGN INDOWNLOADS
Loading image...Kiro

Get Started

InstallationAuthenticationYour first project

Models

OverviewAvailable modelsReasoning effort

Features

How Kiro works
Specs
Steering
Hooks
MCP
Permissions
Custom agents
Agent Skills
Powers
Cloud sessionsCompactionKiroignoreCheckpoints and rewind
Built-in tools
Configuration scopes

IDE 1.x

What's new in 1.0
Setup & First Run
Editor
Chat
Experimental
Troubleshooting0.x reference

CLI

What's new in 3.0
Setup & First Run
Terminal UI
Chat
Fullscreen modeVoice modeHeadless modeACPAuto complete
Experimental
2.x reference

Crew

Quick startInstallationRunning 24/7
Chat
Agent Capabilities
Features
Interfaces
Apps
System & storageConfigurationSecurityTroubleshooting

Web

Setup & First RunIdentity Center
Connect your repositories
Working with the agent
Autonomous modeAutomationsMemoryConfiguration Sync
Sandbox

Mobile - Preview

Overview

Commands and Reference

CLI commandsSlash commandsBuilt-in toolsExit codesSettings

Billing

OverviewManaging your subscriptionUpgrading your planDowngrading your planCancelling your planPurchasing add-on creditsManaging your paymentsManaging usage notificationsManaging your taxesContacting billing supportDeleting your accountRelated questions

Enterprise

ConceptsOnboarding quickstart
Connecting your identity provider
Deployment optionsSubscribe your teamManage subscriptions
Governance
Monitor and track
SettingsManaged updatesBillingIAMSupported regions

Privacy and Security

OverviewData protectionCode referencesCompliance validationInfrastructure securityIAM permissionsFirewalls, proxies, and data perimetersVPC endpoints (AWS PrivateLink)

Guides

Overview
Language support
Learn by playing

Migration

Migrating from Q DeveloperMigrating from VSCodeUpgrading from Q CLI
  1. Docs
  2. Commands and Reference
  3. Exit codes
View as Markdown

Exit codes

View as Markdown

Kiro CLI returns specific exit codes to indicate operation status. Use these in scripts and CI/CD pipelines to detect success, failures, and specific error conditions.

Exit code reference

CodeNameDescription
0SuccessCommand completed successfully
1FailureGeneral failure (auth error, invalid args, operation failed)
3MCP Startup FailureA server required by --require-mcp-startup did not start

Requiring MCP servers

By default, MCP server failures are logged as warnings but don't affect the exit code. Use --require-mcp-startup to wait for configured MCP servers before a run begins:

bash
kiro-cli chat --require-mcp-startup --no-interactive "Run task"

If a required server does not start, Kiro CLI exits with code 3. In a non-interactive V3 run, this includes a server failure, an undetermined startup state, or no reported status within 30 seconds.

Info

Use --require-mcp-startup in CI/CD pipelines where MCP tools are essential. This prevents the task from starting without the expected tools.

Scripting examples

Handle different exit codes to take appropriate action in your automation:

Bash script

bash
#!/bin/bash kiro-cli chat --require-mcp-startup --no-interactive --trust-all-tools "Run analysis" exit_code=$? case $exit_code in 0) echo "Success" ;; 3) echo "MCP servers failed to start"; exit 1 ;; *) echo "Failed with code $exit_code"; exit $exit_code ;; esac

CI/CD pipeline

yaml
- name: Run Kiro task run: | kiro-cli chat --require-mcp-startup --no-interactive --trust-all-tools "Analyze code" continue-on-error: false

Hook exit codes

Hooks use a separate set of exit codes to control tool execution:

CodeBehavior
0Hook succeeded
2(PreToolUse only) Block tool execution; STDERR returned to LLM
OtherHook failed; STDERR shown as warning

Best practices

  • Use --require-mcp-startup in CI/CD when your tasks depend on MCP tools
  • Add verbose logging (-v or -vv) when debugging exit code issues
  • Check exit codes explicitly rather than relying on implicit shell behavior
  • Separate MCP failures from general failures to provide better error messages to users
Page updated: September 17, 2026
Built-in tools
Settings