Skip to content

[Bug]: codemie-claude: "UserPromptSubmit hook timed out after 2s" warning on every prompt (Windows) #454

Description

@watergold20222022

Prerequisites

  • I have searched existing issues to avoid duplicates
  • I am using the latest version of CodeMie CLI (v0.10.1)
  • I have read the documentation

Bug Description

On Windows (native), every user prompt in codemie-claude prints the following warning before the response:

UserPromptSubmit hook timed out after 2s — output discarded. Raise the hook's "timeout" to allow more time.

The CodeMie observability plugin (auto-installed to ~/.codemie/claude-plugin/hooks/hooks.json on first run) registers the codemie hook command with "timeout": 2 for UserPromptSubmit. On this machine the command takes 3–5 s to complete, so the hook times out on every prompt and CodeMie session metrics are silently dropped.

Steps to Reproduce

  1. Run codemie-claude on Windows (native) — first run auto-installs the plugin to ~/.codemie/claude-plugin/
  2. Type any prompt, e.g. hi
  3. Observe the timeout warning printed before the assistant reply

Expected Behavior

The hook completes within its configured timeout so CodeMie metrics are captured on every prompt without a warning — or the default timeout is large enough to accommodate codemie hook startup + sync latency.

Actual Behavior

Every prompt prints the warning and the hook output is discarded. Measured duration of codemie hook (3 runs, feeding a minimal UserPromptSubmit JSON event via stdin):

run 1: 3118 ms
run 2: 3152 ms
run 3: 5010 ms

Likely causes:

  • codemie hook is a Node CLI cold start (~1 s just to boot the interpreter + load the CLI on Windows)
  • The hook also syncs session data to the CodeMie platform (internal endpoint) over the network, adding a few more seconds

CodeMie CLI Version

0.10.1

Which agent are you using?

Claude Code (codemie-claude)

Which provider are you using?

AI/Run SSO

Model

claude-sonnet-4-6

Node.js Version

v24.18.0

Operating System

Windows (native)

Configuration (Redacted)

Redacted — sensitive keys omitted. Relevant part is the auto-installed plugin hooks file:
~/.codemie/claude-plugin/hooks/hooks.json

Error Logs

UserPromptSubmit hook timed out after 2s — output discarded. Raise the hook's "timeout" to allow more time.

Additional Context

  • The same warning can affect other events with tight timeouts in the shipped hooks file (src/agents/plugins/claude/plugin/hooks/hooks.json): PermissionRequest (2 s), Stop (2 s), PreCompact (2 s), SubagentStop (3 s), SessionStart (5 s). Only SessionEnd (10 s) is comfortable.
  • Workaround (verified working): edit ~/.codemie/claude-plugin/hooks/hooks.json and raise the codemie hook timeouts to 10 s for all events; the warning disappears after restarting codemie-claude.
  • Suggested fix: bump the default timeouts in src/agents/plugins/claude/plugin/hooks/hooks.json (e.g. 2 s → 10 s), and/or make the timeout configurable. Note that the hooks file is auto-managed by the CLI, so a local edit gets overwritten on CLI updates.

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