Troubleshooting a 60-second Timeout in the Claude Code VSCode Extension

The article discusses a 60-second timeout issue encountered when using the Claude Code VSCode extension. The root cause was a synchronous 'sleep 600' command in the 'SessionStart' hook of the user's Claude settings, which blocked the subprocess and caused the extension to time out.

💡

Why it matters

This issue highlights the importance of understanding how various configuration options and hooks interact with different environments, such as the VSCode extension, to avoid unexpected behavior.

Key Points

  • 1A 'sleep 600' command in the 'SessionStart' hook of the Claude settings was causing a 60-second timeout in the VSCode extension
  • 2The 'asyncRewake: true' option in the hook was not honored by the VSCode extension, leading to the synchronous blocking behavior
  • 3Removing the 'sleep 600' hook from the settings resolved the timeout issue
  • 4MCP (Model Connection Proxy) connections are asynchronous and did not cause the timeout

Details

The author encountered a 60-second timeout error when opening VSCode with the Claude Code extension installed. After trying to troubleshoot the issue by removing various MCP servers, the real culprit was discovered to be a 'sleep 600' command in the 'SessionStart' hook of the user's Claude settings file. This command was running synchronously, blocking the subprocess and causing the extension to time out after 60 seconds. The 'asyncRewake: true' option in the hook was not honored by the VSCode extension, leading to this behavior. Removing the 'sleep 600' hook from the settings resolved the timeout issue, and the extension was able to start up in 9 seconds. The author also explains that MCP connections are fully asynchronous in Claude Code 2.x, so removing them would not have fixed the timeout problem.

Like
Save
Read original
Cached
Comments
?

No comments yet

Be the first to comment

AI Curator - Daily AI News Curation

AI Curator

Your AI news assistant

Ask me anything about AI

I can help you understand AI news, trends, and technologies