Agent hooks never run in the interactive TUI, on the default engine, distinct from #11614 (which is specific to --v3).
Repro, kiro-cli 2.24.1 on macOS 15.6.1 (arm64):
- Custom agent with a hook that only appends a timestamp, nothing else:
{
"name": "probe",
"description": "probe whether hooks fire",
"tools": ["read", "shell"],
"hooks": {
"userPromptSubmit": [{ "command": "/bin/sh -c 'date >> /tmp/probe.log'", "timeout_ms": 3000 }],
"stop": [{ "command": "/bin/sh -c 'date >> /tmp/probe.log'", "timeout_ms": 3000 }]
}
}
- Headless, no
--v3: kiro-cli chat --agent probe --no-interactive "say OK" → /tmp/probe.log gets two lines, every time.
- Interactive, same agent, same engine:
rm /tmp/probe.log; kiro-cli chat --agent probe (the normal TUI), then type several prompts across a real session lasting hours → /tmp/probe.log is never created.
This is not the --v3 bug in #11614: no --v3 flag is used anywhere in this repro. The difference is --no-interactive vs the interactive TUI.
I use userPromptSubmit to pull messages from a local sidecar into the session (an inter-agent message bus). Over three separate long-running interactive sessions on this agent today, the hook journal (a line appended by the hook command itself, not by kiro) recorded runs from every headless invocation and zero runs from any interactive one, despite each interactive session completing many turns and doing real work in between. Restarting the interactive session did not change this.
If this is intended behavior (hooks are a headless/scripting feature only) it would help to say so in the docs; right now slash-commands/hooks.md and features/agent-configuration.md describe hooks without that caveat, so a hook-based integration looks like it should work in the TUI and silently does not.
Agent hooks never run in the interactive TUI, on the default engine, distinct from #11614 (which is specific to
--v3).Repro, kiro-cli 2.24.1 on macOS 15.6.1 (arm64):
{ "name": "probe", "description": "probe whether hooks fire", "tools": ["read", "shell"], "hooks": { "userPromptSubmit": [{ "command": "/bin/sh -c 'date >> /tmp/probe.log'", "timeout_ms": 3000 }], "stop": [{ "command": "/bin/sh -c 'date >> /tmp/probe.log'", "timeout_ms": 3000 }] } }--v3:kiro-cli chat --agent probe --no-interactive "say OK"→/tmp/probe.loggets two lines, every time.rm /tmp/probe.log; kiro-cli chat --agent probe(the normal TUI), then type several prompts across a real session lasting hours →/tmp/probe.logis never created.This is not the
--v3bug in #11614: no--v3flag is used anywhere in this repro. The difference is--no-interactivevs the interactive TUI.I use
userPromptSubmitto pull messages from a local sidecar into the session (an inter-agent message bus). Over three separate long-running interactive sessions on this agent today, the hook journal (a line appended by the hook command itself, not by kiro) recorded runs from every headless invocation and zero runs from any interactive one, despite each interactive session completing many turns and doing real work in between. Restarting the interactive session did not change this.If this is intended behavior (hooks are a headless/scripting feature only) it would help to say so in the docs; right now
slash-commands/hooks.mdandfeatures/agent-configuration.mddescribe hooks without that caveat, so a hook-based integration looks like it should work in the TUI and silently does not.