[BUG] /terminal-setup writes to wrong path for VSCode installed in portable mode (e.g. via Scoop)

Resolved 💬 1 comment Opened May 29, 2026 by mnaoumov Closed Jul 1, 2026

Summary

/terminal-setup writes the Shift+Enter keybinding to %APPDATA%\Code\User\keybindings.json (or the macOS/Linux equivalent), but VSCode running in portable mode ignores that path entirely — it reads config from a data/ folder next to the executable. Result: the command reports success, but Shift+Enter still doesn't work.

This is distinct from #12848 (forks like Cursor / Antigravity / Windsurf). It's the genuine code executable, just installed in portable mode.

Reproduction

  1. Install VSCode via Scoop on Windows: scoop install vscode (the default Scoop manifest installs portable mode by creating data/ next to code.exe).
  2. From the VSCode integrated terminal, run /terminal-setup.
  3. Output:

``
VSCode terminal Shift+Enter key binding already configured
See C:\Users\<user>\AppData\Roaming\Code\User\keybindings.json
``

  1. Restart VSCode, press Shift+Enter in Claude Code — nothing happens. (Alt+Enter still works, since that's the native binding.)

Root cause

VSCode portable mode is documented at https://code.visualstudio.com/docs/editor/portable. When a data/ folder exists next to the code executable, all user config (settings, keybindings, extensions) lives under <install-dir>/data/user-data/User/, and %APPDATA%\Code is not read.

Scoop's default manifest enables this by creating the data/ folder during install. The Windows Store / "User Installer" flavors do too. The actual config in my case is at:

C:\Users\<user>\scoop\apps\vscode\current\data\user-data\User\keybindings.json

/terminal-setup neither detects portable mode nor reads VSCODE_PORTABLE (the env var VSCode exposes when running portable).

Suggested fix

Before falling back to %APPDATA%\Code\User\:

  1. Honor process.env.VSCODE_PORTABLE if set — <VSCODE_PORTABLE>/user-data/User/ is the config dir.
  2. Otherwise detect by probing for a data/ folder next to the resolved VSCode executable (the same heuristic VSCode itself uses).

Same logic likely needs to apply to all the fork-aware paths added when #12848 was fixed.

Workaround

Manually copy the keybindings to the portable path:

Copy-Item "\$env:APPDATA\Code\User\keybindings.json" "$env:USERPROFILE\scoop\apps\vscode\current\data\user-data\User\keybindings.json"

Environment

  • Platform: Windows 11 (10.0.26200)
  • VSCode: portable, installed via \scoop install vscode\
  • Claude Code: 2.1.153
  • Terminal: VSCode integrated terminal

View original on GitHub ↗

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