Testing and Deployment

A developer wants Kiro to update and run the matching unit tests automatically after every edit to a source file, without prompting Kiro each time. Which Kiro feature should the developer configure?

Show the answer

Correct answerB. An agent hook triggered by the file-save event

AWhy not this: Steering files give Kiro lasting project guidance, but they do not start any action when a file changes.

BWhy this is right: An agent hook runs a predefined prompt or command automatically when its trigger event, such as a file save, occurs.

CWhy not this: A spec structures planned work into requirements, design, and tasks; it is not triggered by file edits.

DWhy not this: An MCP server extends the tools Kiro can call; it does not schedule or trigger work by itself.

Kiro agent hooks run an agent prompt or shell command automatically when an event occurs, such as a file being saved, so they can update and run tests on every change without a manual prompt. Steering files and specs guide what Kiro writes, and an MCP server adds tools, but none of them starts work on its own when a file changes.