[BUG] keybindings.json presence causes input to not clear after submit; keybinding actions ignored

Resolved 💬 3 comments Opened Apr 14, 2026 by fret-scale Closed Apr 18, 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?

When a ~/.claude/keybindings.json file is present, two bugs occur:

  1. The input field is not cleared after submitting a message — the text remains visible and accumulates into subsequent messages
  2. Custom keybinding actions (e.g. chat:newline, chat:submit) are ignored entirely; Enter always submits regardless of configuration

What Should Happen?

  • Input should clear after submission
  • enter: "chat:newline" should insert a newline instead of submitting
  • cmd+enter: "chat:submit" should submit the message

Error Messages/Logs

Steps to Reproduce

  1. Create ~/.claude/keybindings.json with this content:

```json
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"bindings": [
{
"context": "Chat",
"bindings": {
"enter": "chat:newline",
"cmd+enter": "chat:submit",
"meta+enter": "chat:submit"
}
}
]
}

  2. Start Claude Code
  3. Type a message and press Enter — it submits (should add newline)
  4. Type another message and submit — the previous message text is still present in the input

### Claude Model

None

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.89

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

  - Removing keybindings.json completely restores normal behavior (input clears after submit)
  - Tested with both /opt/[redacted]/bin/claude and /opt/homebrew/bin/claude — same result
  - Tested with 3 different terminal applications — same result
  - Tested with a clean environment (env -i) — same result
  - The bug is triggered by the mere presence of the file, regardless of content

also, the desciption of this issue is claude-generated based on the result of the trouble-shooting session

View original on GitHub ↗

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