Skip to content

hooks/ponytail-runtime.js: UserPromptSubmit mode-change message replaces user prompt #363

Description

@nanaubusiness

In hooks/ponytail-runtime.js lines 53-58, for non-SubagentStart events in native Claude Code, writeHookOutput writes the context string directly to stdout.

When the event is UserPromptSubmit, this means the mode-change message (e.g., 'PONYTAIL MODE CHANGED — level: review') is written as hook output, which in Claude Code's hook system replaces the user's actual prompt with that text — the user's input is lost.

The SubagentStart case correctly wraps output in {hookSpecificOutput:{...}} to avoid this, but the UserPromptSubmit path does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions