[BUG] Subprocess initialization did not complete within 60000ms — VS Code extension config-probe/session spawn race (.claude.json EPERM collision)

Status Fixed / completed
Reported on v2.1.281
Maintainer reply None cached
Activity 1 comment · opened Sep 25, 2026 · closed Oct 4, 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?

Every attempt to open a Claude Code session in the VS Code side panel fails with:

Error: Subprocess initialization did not complete within 60000ms — check authentication and network connectivity

This message is misleading. Logs show OAuth, network, and the CLI subprocess itself are all fully healthy — the failure is isolated to the extension's native-panel spawn/IPC path. Running claude directly in VS Code's own integrated terminal (bypassing the panel) connects immediately and works normally every time, using the same authenticated account.

Root cause found via log analysis: the extension spawns two subprocesses close together on session launch — a background "config probe" (permission mode: default) and the real requested session — and both race to atomically write the shared global ~/.claude.json config file. On Windows this produces EPERM errors on the rename step, and the probe's "ready" acknowledgment appears to get lost in that collision, so the extension waits out the full 60s timeout even though the subprocess(es) are healthy.

Full reproduction logs, root-cause evidence, and a working terminal-based workaround are in the file below (too long for this field).

github_issue_claude_code_vscode_timeout.md

What Should Happen?

Claude Code should open and connect within a few seconds in the VS Code side panel — the same way it does when the CLI is run directly in the integrated terminal — instead of waiting out a 60-second timeout and showing "check authentication and network connectivity." Logs confirm auth, network, and the underlying subprocess are all functioning correctly during the failed attempts, so the connection should succeed just as reliably as the terminal-based path does.

Error Messages/Logs

Error: Subprocess initialization did not complete within 60000ms — check authentication and network connectivity

07:11:39.828  Closing Claude on channel: 8z88g4h9909
07:11:39.828  [error] Error spawning Claude (on channel 8z88g4h9909): Error: Subprocess initialization did not complete within 60000ms

07:28:48.520  Spawning Claude ... permission mode: default        (config probe)
07:28:48.530  Spawning Claude ... permission mode: bypassPermissions (real session)
07:28:49.720  [ERROR] Failed to write file atomically: EPERM: operation not permitted, rename 'C:\Users\<user>\.claude.json.tmp.19112...' -> 'C:\Users\<user>\.claude.json'
07:28:51.189  [ERROR] Failed to write file atomically: EPERM: operation not permitted, rename 'C:\Users\<user>\.claude.json.tmp.24268...' -> 'C:\Users\<user>\.claude.json'
07:30:04.130  [error] Error spawning Claude (on channel hihetfmmai): Error: Subprocess initialization did not complete within 60000ms
07:30:04.130  [error] Failed to load config cache: Error: Subprocess initialization did not complete within 60000ms

Steps to Reproduce

  1. On Windows, install VS Code (1.139.0) with the Claude Code extension (reproduced on both 2.1.281 and 2.1.282).
  2. Open any project folder in VS Code.
  3. Open a Claude Code session from the side panel (click the Claude Code icon, or "+ New session").
  4. Wait 60-75 seconds.
  5. Observe the red error banner: "Error: Subprocess initialization did not complete within 60000ms — check authentication and network connectivity."

Reproduced consistently across 5 separate attempts on the same machine, including immediately after a full VS Code restart with no orphaned claude.exe/node.exe processes present, on both a resumed session and a brand-new "+ New session", and independent of the claudeCode.initialPermissionMode and claudeCode.useTerminal settings (neither changed the outcome).

Workaround: running claude directly in VS Code's own integrated terminal (bypassing the side panel entirely) connects immediately and works normally every time, using the same authenticated account — confirming auth/network/CLI are all healthy and the defect is isolated to the panel's spawn/IPC path.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.282 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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