Skip to content

hooks: a Stop hook exits non-zero with no stderr and the report names no hook #2593

Closed

Description

@kyle-sexton

Problem

A Stop hook exits non-zero while writing nothing to stderr, and the resulting report names no hook.

Observed

Ran 5 stop hooks
Stop hook error: Failed with non-blocking status code: No stderr output

Non-blocking, so the session continued — but the failure is undiagnosable as reported:

  • The failing hook is not named. Five ran; the error attributes to none of them.
  • There is no diagnostic. The hook exited non-zero and wrote nothing to stderr, so there is no message to act on.

Two candidate owners

  1. Whichever hook is failing should either exit zero or explain itself. Silent non-zero exit is the defect.
  2. The reporting could name the failing hook. If the harness surfaces enough to attribute it, doing so turns an unactionable line into an actionable one.

Worth checking first

claude-ops ships a Stop-hook failure audit (hook_failure_audit_enabled) built to surface exactly this class of silent launch failure. If it is installed and disabled on this machine, enabling it may name the culprit without any new code — in which case this issue reduces to a configuration note plus whatever the named hook's own bug turns out to be.

Next step

Enumerate registered Stop hooks across user settings and every installed plugin's hooks.json, run each in isolation, and identify which one exits non-zero silently.

Activity

  1. added
    needs-triage
    on Aug 14, 2026
  2. added a commit that references this issue on Aug 14, 2026
    d0cd63f
  3. kyle-sexton commented on Aug 16, 2026

    @kyle-sexton
    MemberAuthor

    Residual filed as issue 2849. PR 2625's exitCode attribution shipped and works. Its empty-stderr placeholder does not: the branch keys on .stderr == "", but the harness never hands the hook an empty stderr — it synthesizes a sentence — so the placeholder is dead code (0 of 175 records measured 2026-08-16) while the unconditional "fails to launch" wording still reaches the operator on the completed-non-zero-exit case this issue was written for.

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

    needs-triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions