Detaching from a sprite running Claude Code

I can detach from a sprite using ctrl+\ and reattach later using sprite sessions ls. Great! But If I am running Claude Code (in YOLO mode, naturally) on my sprite, ctrl+\ seems to get captured and I can’t detach. I can get around that by running claude in a tmux session, and then detaching from the tmux session before I detach from the sprite. But if I do that, claude seems to go to sleep until I re-attach, which kind of ruins the point of detaching while it is chugging along… how do people do this?

Hmm, what terminal/OS are you using? On both the builtin Terminal and Ghostty on macOS, ctrl+\ correctly detaches from Claude Code for me.

OK, I just tried Terminal and that worked OK. But with Ghostty 1.2.3 I cannot detach from within Claude Code. So I guess this is a Ghostty issue…

For anyone else experiencing this, apparently Claude Code enables the Kitty keyboard protocol which encodes Ctrl sequences in a new way. Ghostty supports this new protocol but Claude Code doesn’t properly handle the new encoding.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.