Problem
Checkpoints are only written after a full phase completes. If a scan is interrupted mid-phase (timeout, crash, Ctrl-C), all progress is lost and the scan restarts from scratch.
This is particularly painful for large codebases (8000+ files) where a single scan can take 15-20 minutes. Any interruption means repeating the entire run.
Current behavior
The checkpoint in .sandyaa/checkpoint-<hash>.json is written at phase boundaries. Within a phase (e.g. during recursive verification or POC generation), no intermediate state is persisted.
Expected behavior
Checkpoint should be updated incrementally:
- After file prioritization — save the prioritized file list so re-runs skip the AI-powered prioritization
- After each chunk's detection — save found vulnerabilities per chunk, so completed chunks are not re-analyzed
- After each vulnerability's recursive verification — save verification status per finding
- After each POC generation attempt — save POC result (success, refusal, or error) per finding
- After SARIF generation — save that the report was written (avoid duplicate writes on resume)
Key files
src/utils/checkpoint.ts — Checkpoint persistence logic
src/orchestrator/orchestrator.ts — Main pipeline, calls checkpoint at phase boundaries
src/recursive/recursive-strategy.ts — Recursive verification (8 strategies per finding)
src/agents/agent-executor.ts — POC generation
Acceptance criteria
Context
The tool was designed as a CLI that runs uninterrupted. Now that it's also used as a Claude Code skill (with background task timeouts) and in CI pipelines, robust resume is essential.
Problem
Checkpoints are only written after a full phase completes. If a scan is interrupted mid-phase (timeout, crash, Ctrl-C), all progress is lost and the scan restarts from scratch.
This is particularly painful for large codebases (8000+ files) where a single scan can take 15-20 minutes. Any interruption means repeating the entire run.
Current behavior
The checkpoint in
.sandyaa/checkpoint-<hash>.jsonis written at phase boundaries. Within a phase (e.g. during recursive verification or POC generation), no intermediate state is persisted.Expected behavior
Checkpoint should be updated incrementally:
Key files
src/utils/checkpoint.ts— Checkpoint persistence logicsrc/orchestrator/orchestrator.ts— Main pipeline, calls checkpoint at phase boundariessrc/recursive/recursive-strategy.ts— Recursive verification (8 strategies per finding)src/agents/agent-executor.ts— POC generationAcceptance criteria
Context
The tool was designed as a CLI that runs uninterrupted. Now that it's also used as a Claude Code skill (with background task timeouts) and in CI pipelines, robust resume is essential.