[Bug] Phantom blank messages auto-submitted after user prompt

Resolved 💬 3 comments Opened Feb 6, 2026 by coder903 Closed Feb 10, 2026

Bug Description
[BUG] Phantom blank messages auto-submitted after user prompt

Description

Claude Code intermittently submits blank/empty messages as new user turns after a real user prompt is submitted. These phantom messages trigger all configured hooks (UserPromptSubmit, etc.) and consume a full response cycle, wasting tokens and cluttering the conversation.

Steps to Reproduce

  1. Open Claude Code CLI (terminal, not VS Code)
  2. Have a UserPromptSubmit hook configured in ~/.claude/settings.json
  3. Submit a normal prompt and receive a response
  4. Observe that one or more blank messages are automatically submitted without user input
  5. These blank messages trigger the UserPromptSubmit hook (visible in hook output) and Claude responds to them

Expected Behavior

No messages should be submitted unless the user explicitly types and presses Enter.

Actual Behavior

After submitting a real prompt and receiving a response, one or more phantom empty messages are submitted automatically. The hook fires (showing "UserPromptSubmit hook success: Success"), and Claude processes the blank message as a real user turn. This can happen multiple times in succession.

Environment

  • Claude Code version: 2.1.34 (native binary install)
  • OS: macOS (Darwin 25.2.0)
  • Model: claude-opus-4-6
  • Install method: Native binary (~/.local/bin/claude)
  • Hooks configured: UserPromptSubmit (memory search), PostToolUse (TTS), Stop (TTS)

Additional Context

  • The issue predates the Opus 4.6 release — not specific to this model
  • The UserPromptSubmit hook correctly handles empty prompts (exits early with no output), but Claude Code still processes the empty submission as a user turn
  • No custom keybindings configured
  • Observed in the terminal CLI, not in an IDE integration

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.34
  • Feedback ID: 8080e5c8-f5f5-4822-aa2a-88ec331e0a04

Errors

[]

View original on GitHub ↗

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