/ide command crashes with 'onInstall is not defined' when single IDE detected

Resolved 💬 3 comments Opened Feb 27, 2026 by dbrin Closed Mar 3, 2026

Bug Description

Running the /ide slash command in Claude Code CLI crashes with ERROR onInstall is not defined when exactly one IDE is detected as running.

Environment

  • Claude Code version: 2.1.62
  • Node.js version: v23.3.0
  • OS: Windows 11 Enterprise (arm64) 10.0.26100
  • Install method: npm global (scoop managed Node.js)

Steps to Reproduce

  1. Have exactly one supported IDE running (e.g., VS Code)
  2. Launch claude in a terminal
  3. Run /ide

Error Output

ERROR  onInstall is not defined

 file:///C:/Users/<username>/scoop/persist/nodejs/bin/node_modules/@anthropic-ai/claude-code/cli.js:3782:2521

 - neY (file:///...cli.js:3782:2521)
 - o8 (file:///...cli.js:290:62967)
 - oF (file:///...cli.js:290:76003)
 - TJ (file:///...cli.js:290:75885)
 - oF (file:///...cli.js:290:76790)
 - TJ (file:///...cli.js:290:75885)
 - oF (file:///...cli.js:290:75982)
 - TJ (file:///...cli.js:290:75885)

Root Cause Analysis

In the minified cli.js, the function neY is used as a React useEffect callback in the single-IDE auto-connect code path:

// When exactly 1 IDE is detected, this useEffect runs:
df.useEffect(neY, M)  // M = []

// But neY references variables not in its scope:
function neY(){onInstall(ideToInstall)}

onInstall and ideToInstall are not defined in the scope of neY. This appears to be a bundler/minification issue where closure-captured variables were lost during code splitting. The surrounding code at line 3782 shows neY is defined at module level rather than inside the closure where onInstall and ideToInstall would have been available.

The bug only triggers when exactly one IDE is running. When zero or multiple IDEs are detected, a different code path is taken (the IDE picker UI), which works correctly.

Workaround

  • Connect to the IDE from the IDE side (e.g., install the Claude Code extension in VS Code/JetBrains and initiate the connection from there)
  • Or have zero or 2+ IDEs running when invoking /ide to avoid the single-IDE auto-select path

View original on GitHub ↗

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