Skip to content

Agent hooks never run in the interactive TUI (default engine, not just --v3) #11620

Description

@ekinertac

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):

  1. 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 }]
  }
}
  1. Headless, no --v3: kiro-cli chat --agent probe --no-interactive "say OK" → /tmp/probe.log gets two lines, every time.
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions