[BUG] "4;0;" notifications appearing on Claude code exit

Resolved 💬 3 comments Opened Apr 10, 2026 by xenomachina Closed May 5, 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 I exit Claude code, I get a notification from my terminal (Kitty) that says "4;0;".

<img width="370" height="83" alt="Image" src="https://github.com/user-attachments/assets/9ef4c949-8e58-4126-b395-f12562a285ad" />

I am using kitty 0.33.1 on macOS.

This issue has been reported before, but both instance I found were closed due to inactivity. The instructions there say "If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant."

What Should Happen?

This notification should not appear.

Error Messages/Logs

Steps to Reproduce

  1. In kitty, start Claude Code:

`` sh
claude
``

  1. Press ^D twice to exit.
  2. Observe the notification.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.100 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

I ran claude using script to capture its output:

``` sh
script -q /tmp/claude.out claude


The last few characters it outputs (with control-characters converted to `<this-format>`) are:

<Esc>]9;4;0;<Ctrl-G><Esc>]0;<Ctrl-G>


This appears to be a malformed [OSC 9](https://ghostty.org/docs/vt/osc/9) sequence, which kitty is interpreting as a request to display the notification "4;0;<Ctrl-G>", followed by an OSC 0 to clear the terminal title.

View original on GitHub ↗

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