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

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

/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.

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).

Fix Action

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"

Code Example

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

---

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

---

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

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
  4. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

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