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
  • 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
CompactionKiroignoreCheckpoints 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
Headless modeACPAuto complete
Experimental
2.x reference

Crew

Quick startInstallationRunning 24/7
Chat
Agent Capabilities
Features
Subagents
Scheduling
Artifacts
Multi-instance
Task Runner
Memory
Knowledge
Snapshot & restore
Interfaces
Apps
ConfigurationSecurityTroubleshooting

Web - Preview

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

Mobile - Preview

Overview

Commands and Reference

CLI commandsSlash commandsBuilt-in toolsExit codesSettingsIDE keyboard shortcuts

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
Subscribe 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. Crew
  3. Features
  4. Task Runner

Task Runner


Hand the Task Runner a spec in markdown and it decomposes it into ordered steps, runs each one in its own session, tests the result, retries on failure, and checkpoints progress. Designed for 10+ hours of unattended operation.

The loop

Spec → LLM decomposes → Tasks → Execute → Test → Self-review → Commit or retry

For each task:

  1. Fresh session (taskrunner:{task_id}:task{N}) with full memory injection
  2. Prompt built from the spec + working memory + prior git state
  3. Agent executes tools, streams progress, may call subagents
  4. If tests pass, git commits the change
  5. Independent reviewer session reads the actual git diff and validates
  6. If review fails, revert commit and retry (up to 3 attempts, then re-plan)

Run a task

From the dashboard (recommended)

Open the Projects panel, describe what you want in the Compose area, optionally refine it into a structured spec (✨ Refine), then click Run. The task appears in the sidebar with live progress, step status, and pause/cancel controls.

You can also upload an existing spec file (From Spec tab) or ask in chat: "run this task spec."

From the CLI

bash
kirocrew run TASK.md # auto-resume from checkpoint on restart kirocrew run TASK.md --fresh # ignore checkpoint, start over kirocrew run TASK.md --timeout 3600 kirocrew run TASK.md --no-test # skip test verification

Also available via Slack (run <path>) and the task_run MCP tool.

Spec format

Any markdown file. The Task Runner isn't picky — it decomposes what's there:

markdown
# Migrate user service to Go ## Goal Rewrite the Node.js user service in Go, preserving all behavior. ## Requirements - Every existing endpoint must continue to work - Existing tests must pass - The new implementation must handle the same load ## Acceptance criteria - `curl` smoke tests pass against a local instance - All unit tests pass with `go test ./...` - No behavior change observable from the client

The LLM decomposes this into ordered tasks with dependencies, acceptance criteria, and approval gates.

Refine mode (dashboard)

If you have a rough idea rather than a spec, use ✨ Compose in the dashboard:

  1. Type your idea in natural language
  2. Click ✨ Refine into Spec
  3. The LLM rewrites it into a structured spec (Goal / Requirements / Acceptance Criteria)
  4. Edit the result before running

Refine is a single-shot LLM call — no tools, no clarifying questions.

Concurrent tasks

Up to 3 concurrent task runs are allowed (_MAX_CONCURRENT_TASKS). Each gets its own:

  • task_id — collision-resistant ID
  • Work directory — {work_dir}/{spec_stem}/
  • Session pool — every step gets its own taskrunner:{task_id}:task{N} session
  • Git branch — kirocrew/task/{task_id} (in a worktree if a repo exists)

Cancel a specific task with kirocrew run cancel <task_id>, or all with kirocrew run cancel.

Pause and resume

Tasks can be paused mid-run and resumed later without losing progress:

bash
# In the dashboard Tasks panel: Pause button # In Slack: run pause <task_id> # REST: POST /api/taskrunner/{task_id}/pause

Resume by calling execute with fresh=false:

  • Incomplete tasks are reset to PENDING
  • Passed and skipped tasks are kept as-is
  • The run continues from the first pending task

With fresh=true, all tasks reset — you re-run from the beginning.

Crash recovery

On gateway restart, any task with status == "running" is automatically transitioned to "paused". This prevents zombie tasks that appear running but have no backing asyncio task. Resume manually from the dashboard.

Runs are persisted to ~/.kiro/crew/tasks/runs.json and reload on startup.

Force approval gates

Steps can be marked with force_approval: true in the spec. These gates block execution even in YOLO mode:

  • The task pauses at the gate
  • Inline Approve / Deny buttons appear in the dashboard
  • You must explicitly approve before the step executes

Use force-approval for destructive operations (deploy, delete, publish, rm -rf).

Git coordination

Each task runs on its own isolated git branch:

  • Existing repo — git worktree add creates an isolated working directory; your checkout is untouched
  • No repo — git init in the work directory, then checkout kirocrew/task/{task_id}

Per-step:

  • git add -A && git commit after each passed step
  • git reset --hard HEAD~1 when review fails, before retry
  • git log --oneline + git diff --stat injected into the next step's prompt
  • git diff HEAD~1 fed to the independent reviewer

Git init failure is non-fatal — the task continues without git coordination.

Self-review

Each step passes through an independent reviewer using a separate session (taskrunner:{task_id}:review):

  • Reads the actual git diff HEAD~1 (not the LLM's self-report)
  • Separate session — no bias from having written the code
  • On review failure: revert commit, retry step, re-commit on success
  • Review exceptions are non-fatal (returns "passed" to avoid blocking)

Set the step's status transitions through REVIEWING (visible in the UI as 🔍) before promoting to PASSED.

Retries and re-planning

LayerCapPurpose
MAX_RETRIES3Logic/test failure retries per step
MAX_RECOVERIES2Process crash recovery budget per step
MAX_REPLAN2Plan revisions after a step exhausts retries
MAX_TOTAL_TASKS50Hard cap on total tasks (including replans)

When a step exhausts its retries, the task runner asks the LLM to revise the plan. Up to 2 replans before failing the run.

Cycle detection: 2 identical errors → warning; 3 identical errors → step marked FAILED with "Loop detected". Process crashes don't count toward this.

Parallel task execution

Tasks in the spec can declare dependencies. Tasks without cross-dependencies run in parallel batches of 3 (_MAX_PARALLEL_TASKS):

  • Each batch runs via asyncio.gather(..., return_exceptions=True)
  • The next batch starts only after the current one completes
  • Per-task sessions are reset after the loop

This prevents 5N MCP-server-process cold-start bursts (N parallel tasks = ~5N processes if not batched).

Task-level tools

Every step gets:

  • Full ContextBuilder injection — preferences, projects, history, semantic memory, lessons, episodic memory, triggered skills
  • The step's own text as the primary prompt
  • is_new=True on the first message so injection fires once, then follow-ups reuse context

Watchdog and stall detection

Activity-aware stall detection tracks run.last_task_time, bumped on every stream chunk, tool approval, or recovery:

ThresholdAction
60 min no activity⚠️ Warning notification
2 h no activity🔧 Session reset → recovery retry

Reset cancels the current step session; the retry can fire again if it also stalls.

Notifications

Every event gets a notification prefixed with [spec_name]:

  • 🚀 Task started
  • 📋 Plan ready (step list)
  • ✅ Step N/M passed (title + result preview)
  • ❌ Step N/M failed (title + error)
  • ⚠️ Task may be stalled (minutes since last activity)
  • 🔄 Re-planning (attempt N/2)
  • 📝 Lesson learned
  • ✅ Task completed (final summary with elapsed time and step list)

Send results to a chat slot

Once a task completes, you can open its result inline in a new chat slot:

POST /api/taskrunner/{task_id}/to-chat

This creates a new chat session pre-loaded with the task's spec, plan, and per-step results. From there you can ask follow-up questions or iterate.

Runtime state

Task state is projected into ~/.kiro/crew/tasks/runs.json with:

  • task_id, spec_path, status, timestamps, error, tokens_used, replan_count
  • per-step details (result truncated to 2K per step)

Deleting a run via DELETE /api/taskrunner/{task_id} removes it from memory and disk.

Auto-approve trust

The dashboard exposes an auto_approve toggle per-run:

  • Off (default) — tool permission requests prompt interactively
  • On — tool permission requests auto-approve within the run

The trust is TTL-bounded (dashboard window, 6h max, 24h hard ceiling). Each auto-approved tool call slides the grant forward — an actively-progressing run won't lose trust mid-flight, but an abandoned idle run lapses.

Force-approval gates still block. Hook deny-lists and sensitive-path blocks still apply. auto_approve is scoped tightly and never leaks to cron or MCP-launched runs (those are headless by construction).

Integration with subagents

A task step can spawn subagents:

  • The step's session inherits parent_session_key = taskrunner:{task_id}:task{N}
  • Subagent completions inject back into the step session
  • The step's LLM can synthesize the subagent's output before continuing

This composes cleanly for tasks like "run this analysis against every package in the repo" — the step fans out to subagents, waits for the digest, then continues.

Configuration reference

Task-runner-related settings:

Constant / configDefaultPurpose
MAX_RETRIES3Retries per step
MAX_RECOVERIES2Crash recoveries per step
MAX_REPLAN2Replans per run
MAX_TOTAL_TASKS50Total task cap including replans
_MAX_PARALLEL_TASKS3Parallel batch size
_MAX_CONCURRENT_TASKS3Concurrent runs
CONTEXT_COMPACT_PCT80.0Session compact threshold
TEST_TIMEOUT540090 min for test command
STALL_TIMEOUT360060 min → warn
STALL_CANCEL_TIMEOUT72002 h → reset session
PROGRESS_FILETASK_PROGRESS.mdWritten next to spec file
Page updated: August 4, 2026
Multi-instance
Memory