So I found myself surprised today that exiting the CLI with CTRL-C does not, in fact, close Claude CLI. What it does is it closes the agent's terminal interface, but it leaves a background process active, even if you didn't work on anything at all.

Try it yourself: run claude, close it immediately with CTRL-C or /exit, then `ps ax|grep claude`.

Apparently it's not a bug, it's a "feature", introduced earlier this year. You need to set CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF=1 to switch that thing off.

This is yet another anti-pattern they introduce and it personally upsets me that 5 decades of established patterns (CTRL-C is CTRL-C!) continue to be thrown out of the window just like that.


Comments URL: https://news.ycombinator.com/item?id=50214693

Points: 1

# Comments: 0