Loading image...Kiro

Product

  • About Kiro
  • IDE
  • CLI
  • Web
  • Mobile
  • 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
  • IDE
  • Web
  • Mobile
  • 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
Migration guide
Upgrading agent configs
Permissions migration
Hooks migration
Agent config changes
New features in 3.0
Tangent
Setup & First Run
Terminal UI
Chat
Headless modeACPAuto complete
Experimental
2.x reference

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. CLI
  3. What's new in 3.0
  4. Hooks migration

Hooks migration


New to Kiro CLI 3.0? This page covers migration from CLI 2.x hooks. For the current hooks format reference, see Hooks →.

Tip: Run kiro-cli agent migrate first — it auto-converts hooks to the new format and reports any triggers it couldn't convert.

Hooks have moved from embedded fields in agent config to standalone .kiro/hooks/*.json files with a versioned JSON schema. Rename your trigger keys using the table below, then move the definitions to a new file.

Old format — do not use in 3.0 (shown for migration reference only)

Hooks were embedded directly in agent config:

json
{ "hooks": { "agentSpawn": [{"command": "echo 'starting'", "matcher": ".*"}], "preToolUse": [{"command": "npm run lint", "matcher": "Write|Edit"}], "fileEdited": [{"command": "prettier --write", "matcher": "\\.ts$"}] } }

New format

Each hooks file is a standalone .kiro/hooks/*.json file:

json
{ "version": "v1", "hooks": [ { "name": "lint-on-save", "trigger": "PostFileSave", "matcher": "\\.ts$", "action": { "type": "command", "command": "npm run lint" }, "timeout": 30, "enabled": true }, { "name": "format-on-save", "trigger": "PostFileSave", "matcher": "\\.ts$", "action": { "type": "command", "command": "prettier --write {{filePath}}" }, "timeout": 10, "enabled": true } ] }

Matcher syntax is unchanged — regex patterns from 2.x transfer directly. The {{filePath}} template variable is new in 3.0 and only available in the new format.

Trigger reference

TriggerFires whenMatcher matchesCan block?
SessionStartSession begins—No
StopSession ends—No
PreToolUseBefore tool executesTool name (regex)Yes
PostToolUseAfter tool executesTool name (regex)No
PreTaskExecBefore a spec task starts—Yes
PostTaskExecAfter a spec task finishes—No
UserPromptSubmitUser submits a prompt—Yes
PostFileCreateAfter a file is created by the agentFile path (regex)No
PostFileSaveAfter a file is saved/edited by the agentFile path (regex)No
PostFileDeleteAfter a file is deleted by the agentFile path (regex)No
ManualUser-triggered on demand—No

Old trigger names (2.x → 3.0 mapping):

Old TriggerNew TriggerNotes
agentSpawnSessionStartFires when a new session begins
userPromptSubmitUserPromptSubmitFires before the agent processes a prompt
preToolUsePreToolUseFires before a tool executes
postToolUsePostToolUseFires after a tool completes
fileEditedPostFileSaveFires after a file is written
fileCreatedPostFileCreateFires after a new file is created (IDE legacy alias, now unified)
agentStop / stopStopFires when the session ends — agentStop is IDE legacy; CLI used stop

Matcher semantics by trigger

The matcher field is a regex pattern, but what it matches against depends on the trigger:

Triggermatcher matches against
PostFileSave, PostFileCreate, PostFileDeleteFile path (e.g., \\.ts$, src/.*)
PreToolUse, PostToolUseTool name (e.g., write, shell, write|read)
UserPromptSubmitPrompt text content
SessionStart, Stop, PreTaskExec, PostTaskExec, ManualNot evaluated — hook always fires

Regex patterns from CLI 2.x transfer directly. The {{filePath}} template variable is available only in the new format for file-related triggers.

Once your files are in .kiro/hooks/, Kiro picks them up automatically. See the full hooks reference → for schema details and advanced action types.

Page updated: August 4, 2026
Permissions migration
Agent config changes