[Bug] Input handler hangs on escaped backticks in pasted content

Resolved 💬 3 comments Opened Jan 16, 2026 by AlessandroMartini Closed Jan 20, 2026

Bug Description
Hi Claude Team,

I've encountered a consistent hang in Claude Code when pasting specific text snippets copied from a web interface (specifically the Habitat Code platform).

Issue: The terminal interface becomes completely unresponsive immediately after pasting the content.

Technical Findings: After inspecting the source, I discovered that the copied text includes a CSS pseudo-element (code::after) with the following content: content: "\ ";`.

Running JSON.stringify on the computed style returns: '\"\\"\\""'`. It appears that the combination of the backslash escape character and the backtick (U+0060) is causing a parsing hang in the Claude Code input handler.

Steps to reproduce:

Copy a text block that includes a ::after or ::before pseudo-element containing an escaped backtick or backslash.

Paste it into the Claude Code terminal.

The tool freezes and requires a hard restart.

I'm a Tech Lead working on AI integration, and this significantly impacts the workflow when analyzing pipeline logs or commit messages.

Best regards, Alessandro Martini

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.9
  • Feedback ID: 2ca0229c-c404-45a7-ab20-922a38b8ca20

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/alessandromartini/.local/share/claude/versions/2.1.9 (expected in multi-process scenarios)\n    at BER (/$bunfs/root/claude:3355:2091)\n    at HFA (/$bunfs/root/claude:3355:1202)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-16T13:57:05.799Z"},{"error":"Error\n    at <anonymous> (unknown)\n    at onData (node:child_process:153:110)\n    at emit (node:events:95:22)\n    at addChunk (internal:streams/readable:264:47)\n    at readableAddChunkPushByteMode (internal:streams/readable:242:18)\n    at handleNumberResult (internal:streams/native-readable:69:18)\n    at <anonymous> (internal:streams/native-readable:43:68)\n    at processTicksAndRejections (unknown:7:39)","timestamp":"2026-01-16T13:57:08.608Z"}]

View original on GitHub ↗

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