[BUG] Option+Enter no longer inserts newline in iTerm2 after v2.1.1 upgrade

Status Fixed / completed
Reported on v2.1.1
Maintainer reply None cached
Activity 7 comments · opened Jan 8, 2026 · closed Jan 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?

After upgrading from v2.0.76 to v2.1.1, Option+Enter no longer inserts a newline. Previously this was the default behavior on macOS. Now only Shift+Enter works.

This seems to work properly in the Mac Terminal app.

Environment:

  • Claude Code version: 2.1.1
  • Terminal: iTerm2 (macOS)
  • iTerm2 Left Option key setting: "Esc+"

Workaround: Shift+Enter works correctly. As does Terminal.

What Should Happen?

Expected: Newline inserted, cursor moves to next line
Actual: Nothing happens (or prompt submits)

Error Messages/Logs

Steps to Reproduce

  1. Upgrade to Claude Code v2.1.1
  2. Open Claude Code in iTerm2
  3. Type some text
  4. Press Option+Enter
  5. New lines are not created

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.76

Claude Code Version

2.1.1

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Likely cause:
The v2.1.0 changelog includes terminal keyboard mode changes for iTerm2:

  • "Changed Shift+Enter to work out of the box in iTerm2, WezTerm, Ghostty, and Kitty without modifying terminal configs"
  • "Fixed terminal keyboard mode not being reset on exit in Ghostty, iTerm2, Kitty, and WezTerm"
  • "Fixed Alt+B and Alt+F (word navigation) not working in iTerm2, Ghostty, Kitty, and WezTerm"

These changes to terminal keyboard mode handling appear to have broken Option+Enter (which relies on the Option key sending an escape sequence when set to "Esc+").

Notes:

  • Terminal configuration unchanged; only Claude Code was upgraded
  • /terminal-setup confirms Shift+Enter is natively supported, offers no Option+Enter fix

View original on GitHub ↗

7 Comments

pppp606 · 7 months ago

I’m seeing a very similar regression, possibly the same root cause.

Environment:

  • Claude Code v2.1.1
  • macOS + iTerm2

Issue:

  • Emacs-style Ctrl+j (newline) no longer inserts a line break.
  • This worked correctly until just before upgrading to v2.1.1.

I haven’t opened a separate issue since the environment and timing match this one closely.

MattMencel · 7 months ago

Oddly, but possibly related, the Enter key on my Numpad stopped working after 2.0.76 was upgraded to 2.1.1. I have a full-size 104-key keyboard attached to my Mac.

The main Enter key works fine. 🤷

EDIT: I should have mentioned that Ghostty(1.2.3) is my terminal and fish(4.3.2) is my main shell. I think Claude Code uses Mac native zsh as it's default shell though.

gobriansteele · 7 months ago
Oddly, but possibly related, the Enter key on my Numpad stopped working after 2.0.76 was upgraded to 2.1.1. I have a full-size 104-key keyboard attached to my Mac. The main Enter key works fine. 🤷

Exact same issue for me @MattMencel KeyChron 10 key and same version delta for regression

jeffc-dev · 7 months ago

Verified that this is still broken in ~2.1.2~ ~2.1.3~ ~2.1.4~ 2.1.5.

jonschull · 7 months ago

Same problem with in mac's Terminal with Shift-Enter as well as Option_Enter

  • Running Claude Code in a terminal (not web or IDE)
  • Shift+Enter behaves like Enter (submits instead of newline)
  • Ctrl+Enter opens a context menu
jeffc-dev · 7 months ago

Fixed as of 2.1.6!

github-actions[bot] · 7 months ago

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.