Skip to content

[Bug] Terminal state not restored on exit, causing broken keyboard input #39096

@dimfeld

Description

@dimfeld

Bug Description
Claude is not restoring terminal state on exit. When I press ctrl-modified keys I just get something like 4;5u on the terminal. Claude suggested workaround to printf '\e[>0u', which worked.

Environment Info

  • Platform: darwin
  • Terminal: WezTerm
  • Version: 2.1.84
  • Feedback ID: b4e01cc0-228c-4f57-b611-38515a9881f2

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/dimfeld/.local/share/claude/versions/2.1.84 (expected in multi-process scenarios)\n    at Jm_ (/$bunfs/root/src/entrypoints/cli.js:2740:2168)\n    at tlT (/$bunfs/root/src/entrypoints/cli.js:2740:1326)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-26T02:02:22.334Z"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tuibugSomething isn't workingplatform:macosIssue specifically occurs on macOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions