Skip to content

Hooks emit raw jq: command not found on every turn when jq is absent; no guard or actionable message #87

Description

@jorgealonsodev

Summary

jq is listed under Requirements in the README, but no script checks that it is actually present. When it is missing, every hook invocation leaks raw shell errors into the Claude Code UI on every single turn, and nothing in the output tells the user that jq is the cause.

Observed

On a machine without jq on PATH, each Stop produced:

Stop hook error: Failed with non-blocking status code:
.../scripts/build-payload.sh: line 49: jq: command not found
.../scripts/emit-terminal-sequence.sh: line 82: /dev/tty: No such device or address
.../scripts/emit-terminal-sequence.sh: line 85: jq: command not found

The user is shown a wall of shell noise per turn with no hint that installing jq resolves it. Diagnosing it requires reading the plugin source.

Secondary effect

The absent jq also breaks Claude Code version detection, which pushes emit_terminal_sequence() into the /dev/tty fallback branch. That compounds the noise with the separate redirection defect tracked in #38.

Expected

A single guard at hook entry that degrades gracefully, for example:

if ! command -v jq >/dev/null 2>&1; then
    exit 0
fi

Or, if a visible hint is preferred, one actionable line (claude-code-warp: jq is required, install it with your package manager) instead of a per-turn stack of command not found.

Unguarded jq call sites on current main: build-payload.sh (5), on-stop.sh (4), emit-terminal-sequence.sh (2).

Reproduction

  1. Make sure jq is not on PATH
  2. Enable the plugin in Claude Code
  3. Send any prompt — the errors appear at every Stop

Environment

  • Plugin claude-code-warp v2.2.0
  • Claude Code 2.1.269
  • Warp v0.2026.09.09.08.26.stable.02, Linux, bash 5.2

Workaround

Installing jq through the system package manager silences it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions