[BUG] CLI gets stuck polling UserPromptSubmit instead of making API calls

Resolved 💬 3 comments Opened Jan 19, 2026 by josh-argyle Closed Jan 23, 2026

Description

Claude Code CLI occasionally enters a state where it polls UserPromptSubmit hooks indefinitely instead of making API calls to the model. The user sees the CLI appear to "hang" for 2-20 minutes with no output or progress.

Steps to Reproduce

  1. Start a conversation with a complex task (e.g., "write implementation plans for a new feature")
  2. Observe the CLI hang with no output
  3. Debug logs show continuous polling with no API calls

Expected Behavior

CLI should make API calls and stream responses to the user.

Actual Behavior

CLI enters a polling loop checking UserPromptSubmit hooks every ~5 seconds, never making API calls.

Debug Log Evidence

Session ID: 70073fea-7872-4c2b-81ed-75b8672f6516

2026-01-19T21:21:32.613Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
2026-01-19T21:21:37.695Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
2026-01-19T21:21:42.768Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
2026-01-19T21:21:47.883Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
... (continues for 2+ minutes)
2026-01-19T21:23:35.862Z [DEBUG] [API:request] Creating client  <-- finally resumes

Also observed:

2026-01-19T21:21:32.691Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2026-01-19T21:21:37.764Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
... (repeats every 5 seconds)

Environment

  • Claude Code version: 2.1.12
  • Platform: Linux 6.1.0-41-amd64
  • IDE integration: WebStorm (MCP server "ide")

Additional Context

  • No user input was pending - user was waiting for model output
  • No errors logged during the stuck period
  • Eventually resumes on its own or after user interrupts
  • Happened multiple times across different sessions in the same day
  • Sessions affected: 70073fea-*, 9c2a90c8-*, cb961da7-*

Possibly Related

  • MCP server "ide": Tool 'closeAllDiffTabs' failed errors appear frequently
  • May be related to IDE integration state

View original on GitHub ↗

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