Skip to content

feat(cli): Graceful CLI interrupt handling on Ctrl+C#114

Merged
dcramer merged 1 commit intomainfrom
feat/graceful-sigint
Feb 6, 2026
Merged

feat(cli): Graceful CLI interrupt handling on Ctrl+C#114
dcramer merged 1 commit intomainfrom
feat/graceful-sigint

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 6, 2026

When the user presses Ctrl+C during a scan, the process now collects partial
results from completed skills and renders them instead of hard-exiting with
no output.

Behavior:

  • First Ctrl+C: abort in-progress SDK queries, skip remaining task batches,
    render partial results with "Interrupted" banner, exit 130
  • Second Ctrl+C: force immediate exit
  • Interactive fix flow is skipped when interrupted (user clearly wants out)

The abort controller was already wired through the SDK and checked at the
hunk level, so running tasks finish quickly after signal. The main change is
removing the immediate process.exit(130) and letting the normal output
path run with an interrupted flag.

Closes #109

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
warden Ready Ready Preview, Comment Feb 6, 2026 10:19pm

Request Review

@dcramer dcramer force-pushed the feat/graceful-sigint branch from 8c6923f to 998a095 Compare February 6, 2026 20:32
@dcramer dcramer marked this pull request as ready for review February 6, 2026 21:57
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Route interrupt message through Ink rendering pipeline (TTY) and
logPlain (non-TTY) instead of raw stderr writes that corrupt Ink's
cursor tracking. The abort signal triggers the message in both paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcramer dcramer force-pushed the feat/graceful-sigint branch from 7d5202b to b95cd5f Compare February 6, 2026 22:19
@dcramer dcramer merged commit 3472100 into main Feb 6, 2026
13 checks passed
@dcramer dcramer deleted the feat/graceful-sigint branch February 6, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graceful CLI interrupt handling on Ctrl+C

1 participant