Bash Shift+Enter Newline Functionality Broken in macOS Terminal.app
Bug Description I'm on homebrew bash in macOS Terminal.app and shift+enter NEVER gives me a newline it always submits. something is wrong
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.41
- Feedback ID: 58028017-0705-44bc-b507-fe857ecbbbfb
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at JI (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n at file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:9038\n at Q (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n at _X (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:8184)\n at w_ (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:7265)\n at U9 (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:11432)","timestamp":"2025-07-03T18:28:12.829Z"},{"error":"Error: Error opening file /Users/justin/.claude/projects/-Users-justin-code-searls-posse-party/73b22528-6e02-4b88-8586-34124a4e2b42.jsonl: Error: ENOENT: no such file or directory, open '/Users/justin/.claude/projects/-Users-justin-code-searls-posse-party/73b22528-6e02-4b88-8586-34124a4e2b42.jsonl'\n at Yj1 (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:619:176)\n at async _h1 (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:626:3274)\n at async file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:626:3689\n at async Hw0.appendEntry (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:624:43)\n at async Hw0.insertMessageChain (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:623:25454)\n at async eD1 (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:626:1903)","timestamp":"2025-07-03T18:31:06.812Z"},{"error":"Error: Request was aborted.\n at Tq.makeRequest (file:///Users/justin/.nodenv/versions/22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1332:3838)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at runNextTicks (node:internal/process/task_queues:69:3)\n at process.processTimers (node:internal/timers:526:9)","timestamp":"2025-07-03T18:31:11.345Z"}]
Seeing the same issue in WSL2, even after clearing .config/Code/User/keybindings.json and rerunning /terminal-setup. Previously was working.
edit: #2754 and #1262 may be related.
Did you try /terminal-setup? I cannot use it unfortunately, but if you can use it, that seems to be the ticket (though you will need to use option+enter I guess).
Related: https://github.com/anthropics/claude-code/issues/1793
Just updated to macOS Tahoe Version 26.0, I had the keybindings installed via /terminal-setup in cursor, was working before this update. Removed the keybindings and reinstalled with /terminal-setup. Having same issue.
Here is a similiar issue on the cursor bug tracker https://github.com/cursor/cursor/issues/3598
@searls Did you happen to be using Tahoe in beta when you filed this? I see it was 2 months ago.
Just updated to macOS Tahoe Version 26.0, I had the keybindings installed via
/terminal-setupin cursor, was working before this update. Removed the keybindings and reinstalled with/terminal-setup. Having same issue.Here is a similiar issue on the cursor bug tracker https://github.com/cursor/cursor/issues/3598
@searls Did you happen to be using Tahoe in beta when you filed this? I see it was 2 months ago.
Sure was
Same issue here, worked before, but it stopped working before I updated to Tahoe. Don't know what caused it.
It stopped to work for me yesterday (before the update to MacOs 26).
It looks like the detection of "Use Option as Meta key" in the Terminal app is not working anymore.
UPD: I installed iTerm2, there it works fine.
But I use Claude Code plugin for PhpStorm (basically it's using JetBrain's built-in terminal), and it looks like the keybindings of this terminal connected to the macOs Terminal, so iterm keybindings not affecting the terminal in the IDE.
Therefore, I really wait for a fix.
I'm getting the same problem in iterm2. @asamofal how did you configure iterm2 for this?
Oh, real weird. So this new command, /terminal-setup, seems to exist only to fix the situation. That wasn't very discoverable. It didn't occur to me to look through the commands when existing UX broke.
So /terminal-setup created a global key binding in iTerm2:
What it did:
- Location: iTerm2 → Settings → Keys (global, not profile-specific)
- Key: Shift+Return
- Action: Send Text: \n (literal newline character)
I'm not a terminal expert - I wonder if this will conflict with anything else.
so that's what /terminal-setup is supposed to do. it doesnt actually do anything in iterm2 that I can find. manually setting up
- Location: iTerm2 → Settings → Keys (global, not profile-specific)
- Key: Shift+Return
- Action: Send Text: \n (literal newline character)
seems to have finally made shift-enter working in claude. why claude is the only thing shift+enter doesnt work right in is..interesting.
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.
This is very much still an issue.
Backslash and enter seems to offer a workaround, though it is often not convenient or natural.