Skip to content

Grok runs both native and imported Claude Herdr SessionStart hooks #4018

Description

@Alchemist-DevAI

Summary

A Grok session launched inside Herdr runs both the Herdr-managed Grok SessionStart hook and the Herdr-managed Claude SessionStart hook imported through Grok's Claude compatibility layer.

Environment

  • Windows 11
  • Herdr 0.9.0 stable, protocol 22
  • Grok Build 1.0.30
  • Herdr integrations: Grok v1 and Claude v9
  • Both providers are installed on the same user profile

Observed

A fresh Grok launch executed:

  1. %USERPROFILE%\.grok\hooks\herdr-agent-state.ps1
  2. %USERPROFILE%\.claude\hooks\herdr-agent-state.ps1

Under concurrent startup load, the native Grok invocation took 15.685 seconds and the imported Claude invocation took 14.279 seconds, so both exceeded their generated 10-second timeout.

The commands use different provider-specific paths, so command-string deduplication cannot collapse them. That explanation is an inference from the observed configuration; the exact Grok compatibility merge logic has not been instrumented.

The Claude script may ultimately reject a Grok-shaped payload, but Windows still pays for another PowerShell process and stdin read. Disabling all Claude hook compatibility is not a safe workaround because repositories also rely on non-Herdr Claude-compatible safety hooks. Removing the native Grok hook risks losing the correct herdr:grok session identity.

Expected

When Grok loads Claude-compatible hooks, Herdr should execute one provider-appropriate SessionStart integration and report one herdr:grok session identity.

Possible fixes:

  • Deduplicate Herdr integrations by managed integration identity rather than command path.
  • Have the Grok integration suppress only the imported Claude Herdr hook.
  • Provide a supported compatibility exclusion for a single imported hook.

Reproduction

  1. Install Herdr integrations for both Claude and Grok on Windows.
  2. Keep Grok's Claude hook compatibility enabled.
  3. Launch a fresh Grok with herdr agent start.
  4. Inspect the Grok hook log for SessionStart commands.

Related: #3111 tracks the separate Windows 10-second timeout problem.

Activity

  1. added
    bugSomething isn't working
    p2valid narrow or ordinary defect with limited impact or a practical workaround
    windowsaffects Windows-specific behavior
    integrationsmanaged hooks and integration installation or status
    maintainer-neededrequires maintainer judgment or maintainer-only reproduction
    and removed
    maintainer-neededrequires maintainer judgment or maintainer-only reproduction
    on Sep 12, 2026
  2. kangal-bot commented on Sep 13, 2026

    @kangal-bot
    Collaborator

    Implemented on master and queued for the next release. This is not available in a published Herdr release yet.

  3. kangal-bot commented on Sep 16, 2026

    @kangal-bot
    Collaborator

    Released on the preview channel in 2026-09-16-2c29fb29e302. This is available to preview users, but is not in a stable Herdr release yet.

  4. kangal-bot commented on Sep 16, 2026

    @kangal-bot
    Collaborator

    Released in v0.9.1.

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

    bugSomething isn't workingintegrationsmanaged hooks and integration installation or statusmaintainer-neededrequires maintainer judgment or maintainer-only reproductionp2valid narrow or ordinary defect with limited impact or a practical workaroundwindowsaffects Windows-specific behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions