Answer: Kiro hooks return exit code 0 when the hook succeeded, exit code 2 (PreToolUse only) to block tool execution with STDERR returned to LLM, and any other code means the hook failed with STDERR shown as a warning. Status: Confirmed Entry: tool/kiro/agents-and-automation/hook-exit-codes Revision: 1 Digest: sha256:854ceaf80c1cb9ed (changes whenever the content changes) Timeline: Created: 2026-11-13T03:44:32Z Last changed: 2026-11-13T03:44:32Z Last verified: 2026-11-20T13:31:58Z Next check: 2026-11-21T13:31:58Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of success code | 0 | [1] | 2026-11-20 block code | 2 | [1] | 2026-11-20 other codes | Other | [1] | 2026-11-20 Sources: [1] Amazon Web Services. "Exit codes - Commands and Reference - Docs - Kiro". https://kiro.dev/docs/reference/exit-codes/ Role: primary. Accessed: 2026-11-20T13:31:58Z Quote: "0 Hook succeeded" (Supports: success code) Quote: "2 (PreToolUse only) Block tool execution; STDERR returned to LLM" (Supports: block code) Quote: "Other Hook failed; STDERR shown as warning" (Supports: other codes) Published: 2026-11-20T07:39:25Z Snapshot SHA-256: 6137bfd1d3bfef7777ad565e0657ccc240509e6976f98c2d05903ea49ab694ce (captured 2026-11-20T13:31:57Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T13:31:58Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:31:58Z Last attempt: 2026-11-20T13:31:58Z Notes and limitations: Extracted automatically from a single official source (section "Hook exit codes"). Related: https://latestn.com/tool/kiro/agents-and-automation/hook-trigger-name-changes What trigger name changes apply when migrating Kiro CLI hooks? https://latestn.com/tool/kiro/agents-and-automation/hook-triggers What triggers can fire a Kiro Crew hook automatically? https://latestn.com/tool/kiro/agents-and-automation/hook-triggers-3 What triggers are available for Kiro hooks? https://latestn.com/tool/kiro/agents-and-automation/hook-action-types What action types can Kiro hooks use? https://latestn.com/tool/kiro/agents-and-automation/hook-action-types-2 What action types can Kiro hooks perform? https://latestn.com/tool/kiro/agents-and-automation/hook-actions What actions can a Kiro Crew hook run, like commands or Skills? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:44:32Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/kiro/agents-and-automation/hook-exit-codes/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/kiro/agents-and-automation/hook-exit-codes POST: https://latestn.com/dispute/tool/kiro/agents-and-automation/hook-exit-codes with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/kiro/agents-and-automation/hook-exit-codes?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What exit codes do Kiro hooks return and what do they mean? Revision 1, last verified 2026-11-20T13:31:58Z. https://latestn.com/tool/kiro/agents-and-automation/hook-exit-codes (accessed 2026-11-21T10:02:46Z). @misc{LatestN_tool_kiro_agents_and_automation_hook_exit_codes_r1, title = {What exit codes do Kiro hooks return and what do they mean?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/kiro/agents-and-automation/hook-exit-codes}}, note = {Revision 1; digest sha256:854ceaf80c1cb9ed; last verified 2026-11-20T13:31:58Z; accessed 2026-11-21T10:02:46Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/kiro/agents-and-automation/hook-exit-codes