Claude Code init/statusline setup overwrites Zed keymap.json instead of merging

Resolved 💬 2 comments Opened Jan 13, 2026 by xxxoooxoxo Closed Feb 27, 2026

Description

When running Claude Code init or statusline setup, the Zed keymap.json file gets completely overwritten instead of merged with existing settings. This causes users to lose all their custom keybindings.

Steps to Reproduce

  1. Have an existing Zed keymap.json with custom keybindings
  2. Run Claude Code init or trigger statusline setup for Zed
  3. Observe that keymap.json is overwritten with only the new terminal binding

Expected Behavior

The new keybinding should be merged into the existing keymap.json, preserving all user settings.

Actual Behavior

The entire keymap.json is replaced with just:

[
  {
    "context": "Terminal",
    "bindings": {
      "shift-enter": [
        "terminal::SendText",
        "\^[\r"
      ]
    }
  }
]

All existing keybindings are lost.

Workaround

Zed creates a .bak file before the overwrite, so users can restore from keymap.json.*.bak.

Environment

  • macOS
  • Zed editor
  • Claude Code CLI

🤖 Generated with Claude Code

View original on GitHub ↗

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