Skip to content

CLI: SIGINT ignored during generation — no way to interrupt a long run #111

Description

@TheTom

Ctrl-C during butter generate is completely ignored; the process always runs to natural completion (confirmed 2x with 300- and 2000-token runs, SIGINT at ~2s). No signal handler exists anywhere in the codebase, and the default terminate disposition isn't taking effect — likely masked by the Swift Concurrency / GPU wait loop. Proper fix wants cooperative cancellation: a signal handler setting a flag the token loop (both CPU and GPU-chained paths) checks per iteration, with clean command-buffer completion and terminal state on exit. Found by the RST quick-tests sweep (session sheet: RST/sessions-2026-08-06/quicktests-session-sheet.md).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions