/terminal-setup uses invalid TOML escape sequence \x1b for Alacritty config

Resolved 💬 9 comments Opened Dec 19, 2025 by xerebz Closed Apr 18, 2026

Bug Description

The /terminal-setup command writes an invalid escape sequence to the Alacritty TOML config file, causing Alacritty to fail to load the configuration.

Steps to Reproduce

  1. Run /terminal-setup in Claude Code
  2. Select Alacritty as the terminal
  3. Alacritty shows a config parse error

Error Message

[ERROR] Unable to load config "/Users/username/.config/alacritty/alacritty.toml": Config error: TOML parse error at line 28, column 11
28 | chars = "\x1b\r"
   |           ^
missing escaped value, expected 'b', 'f', 'n', 'r', '\', '"', 'u', 'U'

Root Cause

The generated config uses \x1b (hex escape) which is not valid in TOML. TOML only supports these escape sequences:

  • \b, \f, \n, \r, \t, \\, \"
  • \uXXXX (4-digit Unicode)
  • \UXXXXXXXX (8-digit Unicode)

Fix

Replace \x1b with \^[ in the generated Alacritty config:

# Wrong (current)
chars = "\x1b\r"

# Correct (should be)
chars = "\^[\r"

Environment

  • Claude Code version: 2.0.74
  • OS: macOS
  • Terminal: Alacritty

View original on GitHub ↗

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