Skip to content

bug(claude-code): supported hook setup omits required jq and curl dependencies #1133

Description

@dnlrsls

📝 Bug Description

The supported complete Claude Code plugin setup does not declare or verify the jq and curl executables required by its shared Bash hooks. Multiple hooks parse JSON with jq and send requests through engram_curl, which invokes external curl.

When either executable is unavailable, the hooks fail open. For SessionEnd, that means the process exits successfully without posting /sessions/{id}/end, leaving sessions.ended_at unset even though the documented setup completed successfully.

🔄 Steps to Reproduce

  1. Install Engram and run the documented supported setup with engram setup claude-code.
  2. Run Claude Code in a supported Bash environment where jq or curl is unavailable on PATH.
  3. Start and end a Claude Code session so the SessionEnd hook executes.
  4. Inspect the corresponding Engram session.

✅ Expected Behavior

The supported setup should establish every runtime dependency needed by Claude Code hooks. It should either declare and verify the required executables or use a self-contained Engram entrypoint so session closure works after a successful setup.

❌ Actual Behavior

Setup completes without checking or declaring jq and curl. The hook then exits successfully without closing the session when either command is missing, and sessions.ended_at remains unset.

Operating System

Windows

Engram Version

main-5d5bf835

Agent / Client

Claude Code

📋 Relevant Logs

No output is emitted because the hook is intentionally fail-open and suppresses transport errors.

💡 Additional Context

The problem predates PR #1132 and affects the shared Claude hook adapter boundary, not only SessionEnd. The Engram binary documentation states that the binary has no runtime dependencies, while the supported complete Claude setup names the Engram binary and Bash behavior but does not establish the external JSON and HTTP tools used by the hooks.

This issue should make one plugin-wide product and architecture decision:

  1. Explicitly declare and verify or install bash, jq, and curl for supported hook setups, including Windows behavior; or
  2. Add a dependency-free Engram core entrypoint for hook JSON and HTTP operations, then keep shell adapters thin.

PR #1132 intentionally did not expand into this redesign because it addressed the separate Stop-to-SessionEnd lifecycle defect from #1118.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions