claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Feature Request] Use non-default VS Code terminal profile to run Claude Code

Open jbearak opened this issue 6 months ago • 1 comments

The Claude toolbar button and keyboard shortcut open Claude Code using the default terminal profile.

This can add to the time it takes to start Claude Code.

It also precludes having tmux as the default profile.

For this reason, I think it would be useful if users could configure Claude Code to open itself using a different profile.

For the keyboard shortcut (and not the Claude button) one can program this behavior by editing keybindings.json:

{
  "key": "cmd+escape",
  "command": "-claude-code.runClaude.keyboard",
  "when": "claude-code.hasClaudeInPath"
},
{
  "key": "cmd+escape",
  "command": "runCommands",
  "args": {
    "commands": [
      {
        "command": "workbench.action.terminal.newWithProfile",
        "args": {
          "profileName": "Claude"
        }
      },
      "workbench.action.newGroupRight",
      "workbench.action.terminal.moveToEditor",
    ]
  }
}

This keybinding uses to a claude terminal profile specified in settings.json which starts up faster than my default profile:

"Claude": {
  "overrideName": true,
  "path": "/bin/sh",
  "args": ["-c", "claude"],
  "icon": "robot"
}

jbearak avatar Jun 06 '25 20:06 jbearak

This does look like a nice speed improvement. Looking.

blois avatar Jun 07 '25 20:06 blois

I installed Claude Code (CC) in both Windsurf and VSCode (latest versions at time of writing). CC-doctor suggested my install should be local, I lost the cmd+escape start up of CC, inside the IDE(s).

I got it working again with the help of the first post), where I did the following (I'm on MacOS btw):

In ~/Library/Application\ Support/Code/User/keybindings.json I added (as per first post)

{
  "key": "cmd+escape",
  "command": "-claude-code.runClaude.keyboard",
  "when": "claude-code.hasClaudeInPath"
},
{
  "key": "cmd+escape",
  "command": "runCommands",
  "args": {
    "commands": [
      {
        "command": "workbench.action.terminal.newWithProfile",
        "args": {
          "profileName": "Claude"
        }
      },
      "workbench.action.newGroupRight",
      "workbench.action.terminal.moveToEditor",
    ]
  }
}

The second part of that post worked like this for me (~/Library/Application\ Support/Code/User/settings.json):

...
"terminal.integrated.profiles.osx": {
    "Claude": {
      "overrideName": true,
      "path": "/bin/sh",
      "args": ["-c", "~/.claude/local/claude"],
      "icon": "robot"
    }
  }
} //EOF

sixman9 avatar Jul 05 '25 13:07 sixman9

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Dec 10 '25 10:12 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 17 '25 14:12 github-actions[bot]