[Bug] Prompt-based Stop hooks broken in v2.0.37 (regression from v2.0.36)

Resolved 💬 6 comments Opened Nov 14, 2025 by teren-papercutlabs Closed Jan 31, 2026

Prompt-based Stop hooks broken in v2.0.37 (regression from v2.0.36)

Bug Description

Prompt-based Stop hooks are broken in Claude Code v2.0.37. They work correctly in v2.0.36.

Versions

  • Working: v2.0.36
  • Broken: v2.0.37 (current latest)

Issue

In v2.0.37, prompt-based Stop hooks receive only metadata via $ARGUMENTS, but the LLM evaluating the hook does NOT receive the transcript content. The hooks consistently respond that they "cannot evaluate without reading the transcript file."

In v2.0.36, the same hooks work correctly - Claude Code automatically reads the transcript and passes the content to the model for evaluation.

Evidence from Debug Logs

v2.0.37 (Broken)

From /Users/teren/.claude/debug/46a5ed42-3e45-46c3-87f9-7b8ff8b380bd.txt:

The hook receives metadata:

{
  "session_id": "...",
  "transcript_path": "/path/to/transcript.jsonl",
  "cwd": "...",
  "hook_event_name": "Stop",
  "stop_hook_active": false
}

But the LLM responds:

"I cannot evaluate this hook without reading the transcript file to extract the last assistant message."

v2.0.36 (Working)

From /Users/teren/.claude/debug/9acc4e04-0157-4802-857c-fd12aca41d0c.txt:

Lines 232-242 show the model being queried with full context:

[DEBUG] Hooks: Querying model with 4 messages

Lines 246-263 show proper evaluation with content-aware reasoning:

{
  "decision": "approve",
  "reason": "No excessive agreement patterns detected in the transcript. The assistant provided specific, actionable guidance..."
}

The hooks successfully analyze the actual message content, not just metadata.

Hook Configuration

Example prompt-based Stop hook (in ~/.claude/settings.json):

{
  "hooks": {
    "Stop": [
      {
        "type": "prompt",
        "prompt": "You are checking if Claude is speculating about verifiable facts instead of investigating.\n\nInput: {\"session_id\":\"...\",\"transcript_path\":\"...\"}\n\nExtract the last assistant message.\n\n[... evaluation logic ...]\n\nResponse format:\n{\n  \"decision\": \"block\" or \"approve\",\n  \"stopReason\": \"...\",\n  \"reason\": \"...\"\n}"
      }
    ]
  }
}

Steps to Reproduce

  1. Configure a prompt-based Stop hook in settings.json
  2. Use Claude Code v2.0.37
  3. Send any message that triggers a Stop hook
  4. Check debug logs - the LLM will report it cannot evaluate without the transcript

Expected Behavior

Claude Code should automatically read the transcript file and provide the content to the LLM evaluating prompt-based hooks, as it did in v2.0.36.

Actual Behavior

The LLM receives only metadata and cannot access message content to perform evaluation.

Workaround

Downgrade to v2.0.36:

npm install -g @anthropic-ai/claude-code@2.0.36

Impact

This breaks all prompt-based Stop hooks that need to analyze message content (quality control, style enforcement, anti-patterns detection, etc.).

Additional Context

  • The official Claude Code docs don't clearly explain how prompt-based hooks should access transcript content
  • The example hooks in docs don't show this mechanism
  • This appears to be an unintentional regression in the hook execution pipeline

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗