Skip to content

0.34.0 regression (macOS): interactive TUI never executes [[hooks]] (SessionStart/UserPromptSubmit/SessionHeartbeat); kimi -p works #2779

Open

Description

@GeorgeIsForeverYoung

Version: kimi-code 0.34.0 (macOS 15, arm64, ~/.kimi-code/bin/kimi, auto-updated from 0.33.0 on 2026-08-10)
Config: ~/.kimi-code/config.toml — two [[hooks]] entries (SessionStart, SessionEnd). kimi doctor reports the file valid.

Summary

After auto-updating from 0.33.0 to 0.34.0, the interactive TUI never executes any configured [[hooks]] — verified for SessionStart, UserPromptSubmit, and SessionHeartbeat. The same config works correctly in headless mode (kimi -p), where SessionStart fires and the hook command runs. On 0.33.0 the same hooks fired reliably in interactive sessions (daily use for weeks).

Config

[[hooks]]
event = "SessionStart"
command = "/Applications/QuotaWidget.app/Contents/MacOS/QuotaWidget --session-start"
timeout = 5

[[hooks]]
event = "SessionEnd"
command = "/Applications/QuotaWidget.app/Contents/MacOS/QuotaWidget --session-end"
timeout = 5

(The hook launches a floating quota-widget; this is how the regression was noticed — the widget stopped auto-starting.)

Steps to reproduce

  1. Add a probe hook to ~/.kimi-code/config.toml:

    [[hooks]]
    event = "SessionStart"
    command = "/bin/bash -c 'echo $(date -u +%FT%TZ) SessionStart >> /tmp/hook-probe.log'"
    
    [[hooks]]
    event = "UserPromptSubmit"
    command = "/bin/bash -c 'echo $(date -u +%FT%TZ) UserPromptSubmit >> /tmp/hook-probe.log'"
    
    [[hooks]]
    event = "SessionHeartbeat"
    command = "/bin/bash -c 'echo $(date -u +%FT%TZ) SessionHeartbeat >> /tmp/hook-probe.log'"
  2. Start an interactive TUI session (also reproducible under a pty: (printf 'hi\n'; sleep 80) | script -q /tmp/tui.log kimi), send a message, wait 80 s.

  3. Observe: /tmp/hook-probe.log is never created — none of the three events fire.

  4. Control: kimi -p "hi" with the same config → /tmp/hook-probe.log gets a SessionStart line and the hook command executes successfully.

Observed vs expected

  • Expected (per docs and 0.33.0 behavior): interactive sessions fire hooks identically to headless ones.
  • Actual: interactive TUI silently runs zero hooks; no warning, no log line, kimi doctor says everything is valid.

Additional clues

Impact

Any tooling that keys off SessionStart/SessionEnd (launch-on-start widgets, session trackers) or UserPromptSubmit (context injection) silently stops working in the primary interactive use case after the 0.34.0 auto-update, with no user-facing signal.

Happy to provide session ids / wire logs from the reproduction runs if useful.

Activity

  1. SnowingFox commented on Aug 11, 2026

    @SnowingFox

    Opened a PR to address this: #2822

  2. mikallojjus commented on Sep 23, 2026

    @mikallojjus

    Still reproduces on 2.0.2 (Windows 11) — interactive TUI never fires config hooks, headless works.

    Setup: a single [[hooks]] entry with event = "Stop" in ~/.kimi-code/config.toml, command is a bash script that appends a line to a log file on entry (so any invocation is detectable, even skips).

    Results:

    • kimi -p "..." from the same project directory → hook fires, script runs, checks execute. Reproducible every time.
    • Interactive TUI (kimi, fresh session started after the config was already in place, kimi doctor reports config valid) → script never invoked; zero hook-related log lines in the session log; turn ends with no hook activity.
    • /reload does not change this for the current session; starting a brand-new session afterwards also does not.

    So this is not macOS-only and not limited to SessionStart/SessionHeartbeat — the Stop event is affected too. The silent-failure pattern matches #2766 (spawn failures swallowed, no diagnostic anywhere).

  3. added a commit that references this issue on Oct 24, 2026
    4965757
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions