[BUG] Statusline not refreshed immediately after blocked UserPromptSubmit hook when command has arguments

Resolved 💬 1 comment Opened Dec 24, 2025 by kylesnowschwartz Closed Jan 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the UserPromptSubmit hook with the "hook-intercept-block" pattern (returning {"decision": "block", "reason": "..."} to handle slash commands without an API call), the statusline refresh behavior differs based on whether the command has arguments:

  • No-arg commands (e.g., /my-command) → Statusline refreshes immediately (~20ms)
  • Commands with arguments (e.g., /my-command foo) → Statusline refresh is delayed until next user interaction (~18+ seconds)

Both commands are handled identically by the hook (same code path, same decision: block response), but the UI behavior differs.

What Should Happen?

The statusline should refresh immediately after any UserPromptSubmit hook returns {"decision": "block"}, regardless of whether the original command had arguments.

Steps to Reproduce

  1. Create a plugin with a UserPromptSubmit hook that intercepts commands and returns a block decision:
{
  "hooks": [{
    "event": "UserPromptSubmit",
    "matcher": "^/test",
    "hooks": [{
      "type": "command",
      "command": "my-handler"
    }]
  }]
}
  1. Have the handler return:
{"decision": "block", "reason": "Handled!"}
  1. Configure a custom statusline that changes based on handler state
  1. Test both variants:
  • Run /test (no arguments) → Statusline updates immediately
  • Run /test foo (with argument) → Statusline doesn't update until you type something or interact with the terminal

Timing evidence from debug logs:

# /bumper-resume (no arg)
12:33:45.123 handleResume called
12:33:45.145 statusline called  ← 22ms later (immediate)

# /bumper-view tree (with arg)
12:34:01.234 handleView called
12:34:19.567 statusline called  ← 18 seconds later (delayed until interaction)

Claude Model

  • Sonnet (default)

Is this a regression?

I don't know

Claude Code Version

2.0.76 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

Workaround: We worked around this by creating separate no-argument commands for each option (e.g., /bumper-tree, /bumper-icicle instead of /bumper-view tree, /bumper-view icicle). No-arg commands consistently trigger immediate statusline refresh.

Hypothesis: Claude Code's UI might be treating commands with arguments as potentially requiring further processing, deferring the statusline refresh until a "safe" point. But with decision: block, no further processing occurs, so the refresh should happen immediately.

Repository demonstrating the issue: https://github.com/kylesnowschwartz/claude-bumper-lanes (see bumper-lanes-plugin/tools/bumper-lanes/internal/hooks/prompt_handler.go)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗