`/terminal-setup` detects its own installed keybinding as conflict on second run

Resolved 💬 3 comments Opened Dec 20, 2025 by carrgust Closed Feb 14, 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?

Running /terminal-setup twice in VSCode terminal causes a loop:

  1. First run: Successfully installs the Shift+Enter keybinding with \^[\r
  2. Second run: Detects this same keybinding as a "conflict" and asks to remove it

The command doesn't recognize its own installed keybinding format, treating ANY shift+enter binding as a conflict - even the one it just installed.

What Should Happen?

Running /terminal-setup multiple times should be idempotent:

  • If the correct keybinding is already installed, the command should recognize it and report "Already configured" or similar
  • The command should only warn about conflicts when a DIFFERENT keybinding exists (e.g., user's custom \\\r\n binding), not its own installed binding

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in VSCode integrated terminal
  2. Run /terminal-setup
  3. Observe: "Installed VSCode terminal Shift+Enter key binding"
  4. Run /terminal-setup again
  5. Observe: "Found existing VSCode terminal Shift+Enter key binding. Remove it to continue."

The keybinding file at ~/Library/Application Support/Code/User/keybindings.json shows:

[
    {
        "key": "shift+enter",
        "command": "workbench.action.terminal.sendSequence",
        "args": {
            "text": "\^[\r"
        },
        "when": "terminalFocus"
    }
]

This is the exact binding that /terminal-setup installs, yet on second run it's detected as a conflict.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.74 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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