Skip to content

UserPromptSubmit hook "Tracking ponytail mode..." intermittently hits the 5 s timeout on Windows #1158

Closed

Description

@LouisLewin

On Windows, the UserPromptSubmit hook in hooks/claude-codex-hooks.json sometimes exceeds its 5-second timeout. Claude Code then discards its output:

UserPromptSubmit hook [Tracking ponytail mode...] timed out after 5s — output discarded. Raise the hook's "timeout" to allow more time.

When this happens, mode tracking for that prompt is lost.

Environment

  • ponytail 4.8.4 (installed via the ponytail marketplace). In 4.8.4 the hook runs through the commandWindows PowerShell wrapper (if (Get-Command node ...) { node ...\ponytail-mode-tracker.js }).
  • Windows 10 Pro 19045, Windows PowerShell 5.1, node v25.8.1, Claude Code 2.1.302

Measurements
The script itself is fast. Run manually through the same wrapper, both with and without a PowerShell profile, it takes 0.15–0.18 s; no PowerShell profile exists on this machine. The timeouts are therefore intermittent and look like cold-start overhead (first PowerShell or node launch, possibly antivirus scanning), not like slowness in the script. I have not pinned down the exact cause.

Current main
On main the hooks now run as node -e "require(...)" without the PowerShell wrapper, which should reduce the overhead. However, all three hooks (SessionStart, SubagentStart, UserPromptSubmit) still have "timeout": 5, so a slow first node start on Windows can still hit the limit.

Proposed fix
Raise the timeout, for example to 15 s, at least for UserPromptSubmit and possibly for the other two hooks:

"timeout": 15,
"statusMessage": "Tracking ponytail mode..."

The normal case doesn't get slower, since the hook still returns in under 0.2 s; only an occasional slow start no longer discards the output.

I've applied this locally to 4.8.4 (plugin cache and marketplace copy). It should resolve the issue; I'll report back after a few sessions. Local edits are overwritten on every plugin update, so an upstream change would be appreciated.

Activity

  1. DietrichGebert commented on Oct 18, 2026

    @DietrichGebert
    Owner

    Thanks! Fixed in #1165, will be in the next release.

  2. added a commit that references this issue on Oct 18, 2026
    5a5a605
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions