You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UserPromptSubmit hook output hides user messages from chat history (desktop, Windows) #4132
сообщения пользователя исчезают из истории при подаче UserPromptSubmit-хука
UserPromptSubmit hook output hides user messages from the chat history (desktop, Windows)
Client: Kimi Code desktop, Windows, version 1.0.4. Config: ~/.kimi-code/config.toml.
Symptom: if a [[hooks]] entry with event UserPromptSubmit produces any stdout (plain text or {"message": ...} - both forms tested), the user's own messages disappear from the chat history in the desktop UI. A new message is hidden immediately after sending; after restarting the app, history renders only up to the moment the hook started producing output.
Reproduction: 1) add a [[hooks]] block with event = "UserPromptSubmit" and a command that prints a line to stdout; 2) send any message; 3) the message is not shown in the chat. Remove the hook block and restart the app - the full history renders again. Verified twice, including with the {"message": ...} form: same result.
Data is not lost: the messages are present in the session's wire.jsonl (the model sees and quotes them) - the issue is purely in the UI rendering of hook_result blocks. The same hook config works correctly in the CLI (kimi -p): output is delivered to the model and the transcript is unaffected.
Expected: user messages are always rendered; hook output is shown as a separate marked block that does not affect adjacent messages.
Side note: /reload does not pick up config changes for hooks (only a full app restart does) - either expected behavior worth documenting, or a second bug.
Activity