claude-code
claude-code copied to clipboard
[BUG] /terminal-setup is hidden in unsupported terminals; instead claude tries to parse the prompt
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 0.2.100
- Operating System: macOS 14.3
- Terminal: Ghostty
Bug Description
I saw a report that /terminal-setup did awesome stuff to set up claude code with the user's terminal. When I tried it, claude went off to research "terminal-setup" because I'm using Ghostty, which isn't supported by terminal-setup
It's weird and surprising that / commands are hidden when unsupported and don't offer up an error message.
There's an argument that unknown or unsupported /commands shouldn't be handed to the model, but should instead throw an error.
Steps to Reproduce
- Use an unsupported terminal
/terminal-setup
Expected Behavior
An error message that /terminal-setup isn't supported on this platform.
Actual Behavior
Claude starts research
Additional Context
I got this issue on latest Mac OS running inside tmux. It worked when I ran it outside tmux and then shit+enter worked inside tmux afterwards :-)
I am get this issue (missing /terminal-setup) running:
- Environment: Windows 11 using WSL2 (Ubuntu 24.04)
- Claude Code version: 1.0.2 (Claude Code)
- Terminal: Windows Terminal
- Shell: Bash
Also not working for me. I tried in and outside of tmux environment.
Environment information:
- Claude Code Version: 1.0.67
- Operating System: Ubuntu 24.04.2 (Linux 6.8.0-71-generic)
- Architecture: x86_64
- Shell: /bin/bash
- Node.js: v22.15.1
- Python: 3.13.5
Same here:
- Claude Code Version: 1.0.69
- Operating System: Ubuntu 24.04.2 (Linux 6.8.0-71-generic)
- Architecture: x86_64
- Shell: /bin/bash
- Node.js: v22.15.1
- Python: 3.13.5
Issue: Unable to configure Shift+Enter for newline insertion in chat input. Standard VS Code keybinding configuration methods don't work for Claude Code's terminal interface.
Expected behavior: Shift+Enter should insert a newline in the chat input field to allow multi-line messages.
Actual behavior: Shift+Enter sends the message instead of creating a newline.
Steps attempted:
- Used Command Palette → "Preferences: Open Keyboard Shortcuts"
- Searched for "insert line" commands
- Attempted to bind Shift+Enter to editor.action.insertLineAfter
- Ran /terminal-setup command
Result: None of the standard keybinding approaches worked for the chat interface.
I am having the same problem. It works outside of tmux but not inside. After completing the terminal-setup outside of tmux, the applied keymaps still don't seem to work.
After a lot of testing, the best I managed to do was this:
- Create a new key map für Shift+Enter in iTerm2 -> Settings -> Keys
- Choose "Send text" as action
- Enter "\ \n" (that is two backslashes with a space in between)
- Save
This prints a "\" into the claude terminal window, but it also creates a newline.
Any other combination of backspaces and "\n" characters did not work for me.
Bumping this as it's also happening to me, in my case using the PyCharm (2025.2) built-in terminal (the Reworked version, the Classic works fine). I guess this also applies to all the other Jetbrains IDEs
Is /terminal-setup something that is just not implemented in various Linux platforms such as Fedora 42? When I use /terminal-setup with the latest version of Claude (1.0.110) I get "> Unknown slash command: terminal-setup". (Note: This is not inside of tmux or screen or anything like that).
If terminal-setup is not available on Fedora (or Linux more specifically), how does one setup Claude to use shift-enter properly? Being forced to use ctrl-enter is a usability issue.
Still not addressed/fixed:
root@BigServer:/opt# claude ╭───────────────────────────────────────────────────╮ │ ✻ Welcome to Claude Code! │ │ │ │ /help for help, /status for your current setup │ │ │ │ cwd: /opt │ ╰───────────────────────────────────────────────────╯
What's new:
• Upgraded Opus to version 4.1
• Fix incorrect model names being used for certain commands like /pr-comments
• Windows: improve permissions checks for allow / deny tools and project trust. This may create a new project entry in .claude.json - manually merge the history field if desired.
• Windows: improve sub-process spawning to eliminate "No such file or directory" when running commands like pnpm
• Enhanced /doctor command with CLAUDE.md and MCP tool context for self-serve debugging
Unknown slash command: terminal-setup
/exit ⎿ (no content)
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ > │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ? for shortcuts root@BigServer:/opt# claude --version 1.0.110 (Claude Code) root@BigServer:/opt# cat /etc/os-release PRETTY_NAME="Ubuntu 24.04.2 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.2 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo root@BigServer:/opt#
I'd say there's at least two different issues here:
- Any input beginning with / should be treated as meta input to avoid user surprise, so even /fnord should result in "There is no 'fnord' slash-command" or something like that. This is a pattern in vast swathes of text user interfaces.
- Lots of people (including me) are having problems with /terminal-setup in environments which are not particularly unusual. And I say "Lots of people" because I found a bunch of bugs which were auto-closed, such as the ones which are related to this one. The error messages I got from everything I tried were "Terminal setup cannot be run from %s" where %s is 'tmux/screen', 'ssh-session', 'vte-based', and 'linux'. Is this a technical or policy limitation? What kind of terminal environment is supported? It lists some options but doesn't say what it is about those that makes them supported. Is it their termcap?
Alright, after tons of digging, I believe I have at least one answer:
The limitation is technical, not policy: /terminal-setup is meant to configure the current terminal emulator, and if the inner-most terminal (ssh, screen, etc) doesn't have a way to be configured or doesn't support the kind of configuration claude code wants to set up, then we get this error. gnome-terminal is an example of a gui terminal emulator which does not have a way to bind shift-enter to sending "\n". I don't know what, if any, other settings the command is meant to configure.
As a user, I'd like that explicated in the error or on a page the error links to.