Skip to content

Canceling a scan with Ctrl-C can leave it marked as RUNNING indefinitely #44

Closed

Description

@agus-castro

Canceling a scan with Ctrl-C can leave the scan permanently marked as RUNNING in the history, even though the CLI exits and no related processes remain.

The CLI prints:

  codex-security: Scan canceled by Ctrl-C.
  codex-security: Partial output was kept at <output-directory>.

However, codex-security scans list continues to show:

  RUNNING · deep
  COVERAGE 0 of 0 reviewed · <file-count> files

No codex-security or codex exec processes are still running.

Environment

  • Codex Security CLI: 0.1.1
  • Node.js: 22.23.1
  • npm: 10.9.8
  • OS: macOS
  • Authentication: stored ChatGPT credentials
  • Scan mode: deep

Steps

  1. Start a deep scan.
  2. Cancel it once with Ctrl-C.
  3. Wait for the CLI to exit.
  4. Confirm that no related processes remain.
  5. Run codex-security scans list.

Expected

The scan should be recorded as canceled or failed.

Actual

The scan remains permanently marked as RUNNING.

Activity

  1. added
    bug
    on Aug 3, 2026
  2. added
    area:cli
    area:reports
    priority:p2
    on Aug 15, 2026
  3. mldangelo-oai commented on Oct 8, 2026

    @mldangelo-oai
    Collaborator

    Related: merged #393 corrects the scan’s cancellation instructions. Open #1260 waits for Deep cancellation to be saved before returning; the original stuck-RUNNING case still needs confirmation.

  4. added
    area:artifacts
    area:deep-scan
    and removed
    area:cli
    area:reports
    on Oct 8, 2026
  5. mldangelo-oai commented on Oct 19, 2026

    @mldangelo-oai
    Collaborator

    Thanks for the clear reproduction. #1260 fixed the Deep Scan cancellation lifecycle and is included in 0.4.0. Cancellation now waits for worker cleanup and saved-state publication before returning, and the current cancellation lifecycle tests pass.

    I'm closing the original stuck-RUNNING report as fixed. If it still happens on 0.4.0 or later, please follow up with the CLI version, OS, scan mode, and whether you pressed Ctrl-C once or more than once. #735 tracks the separate distinction between recording a cancellation and recording a failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:artifactsarea:deep-scanbugpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions