Add confirmation before closing session with double Ctrl+C
Problem description:
Currently, pressing Ctrl+C twice in a row immediately closes the Claude Code session, with no confirmation at all. This can happen by accident — for example, when trying to interrupt an ongoing operation and pressing the combination a second time without realizing it — causing the loss of the active session.
Expected behavior / suggestion:
Add a confirmation before closing the session when a double Ctrl+C is detected, similar to the one that already exists for Ctrl+D (which requires a second press within a short time window as explicit confirmation). Alternatively, allow this behavior to be toggled from settings.json or keybindings.json.
Additional context:
Both Ctrl+C and Ctrl+D are documented as non-rebindable (hardcoded) in the keybindings system, so there is currently no way to mitigate this risk through user configuration.