agent-loop-ext
Crash-resilient external agent loop with state persistence and CI/CD integration
Create, list, or recover mid-workflow checkpoints so interrupted work resumes from a known-good position
$ npx -y skills add jmagly/aiwg --skill checkpoint --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/checkpointContext preview
The summary Claude sees to decide when to auto-load this skill.
Create, list, or recover mid-workflow checkpoints so interrupted work resumes from a known-good position
namespace: aiwg name: checkpoint platforms: [all] description: Create, list, or recover mid-workflow checkpoints so interrupted work resumes from a known-good position
You create, list, or recover lightweight mid-workflow checkpoints that allow a crashed or interrupted workflow to continue from a known-good position rather than restart from scratch.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
| Pattern | Example | Action | |---------|---------|--------| | Create (named) | "checkpoint this as iteration-3-complete" | Run `aiwg checkpoint create --name iteration-3-complete` | | Create (anonymous) | "create a checkpoint" | Run `aiwg checkpoint create` | | List | "show available checkpoints" | Run `aiwg checkpoint list` | | Recover (latest) | "recover from the last checkpoint" | Run `aiwg checkpoint recover` | | Recover (specific) | "recover checkpoint ckpt_7b2f1a" | Run `aiwg checkpoint recover ckpt_7b2f1a` |
When triggered:
1. **Extract intent**:
2. **Run the appropriate subcommand**:
# Create — anonymous aiwg checkpoint create # Create — named aiwg checkpoint create --name <name> # List all checkpoints aiwg checkpoint list # Recover — most recent checkpoint aiwg checkpoint recover # Recover — specific checkpoint by ID or name aiwg checkpoint recover <id>
3. **Checkpoints vs. snapshots**: Checkpoints are lightweight — they record the current workflow phase and step plus any in-progress artifact paths, not full artifact checksums. Use snapshots for complete point-in-time captures; use checkpoints for crash recovery during active workflows.
| | Checkpoint | Snapshot | |---|---|---| | **Purpose** | Crash recovery | Reproducibility | | **Size** | Small (phase + step + artifact refs) | Full (versions + checksums) | | **Created by** | Manual or agent loop (auto) | Manual only | | **Use for** | Resume interrupted run | Replay from known state |
4. **Automatic creation**: Agent loops create checkpoints automatically between iterations. Manual `create` supplements this for critical workflow milestones.
5. **Storage**: Checkpoints are stored in `.aiwg/checkpoints/` as lightweight JSON files.
6. **Report the result** — on create, confirm the checkpoint ID and position; on recover, confirm which step the workflow will resume from.
**User**: "Create a checkpoint after iteration 3 completes"
**Extraction**: Create subcommand, name `iteration-3-complete`
**Action**:
aiwg checkpoint create --name iteration-3-complete
**Response**: "Checkpoint `iteration-3-complete` created (ID: `ckpt_7b2f1a`). Recorded position: Construction phase, iteration 3, step 12/15. In-progress artifacts: `.aiwg/working/tests/integration-plan-draft.md`. Stored at `.aiwg/checkpoints/ckpt_7b2f1a.json`."
**User**: "What checkpoints do we have?"
**Extraction**: List subcommand
**Action**:
aiwg checkpoint list
**Response**:
ID Name Date Phase / Step ckpt_3a8c12 (auto) 2026-03-28 10:04:51 Construction / iter 1, step 8 ckpt_9f20de (auto) 2026-03-29 14:17:33 Construction / iter 2, step 15 ckpt_7b2f1a iteration-3-complete 2026-03-30 09:55:02 Construction / iter 3, step 12
**User**: "The workflow crashed — recover from the last checkpoint"
**Extraction**: Recover subcommand, use most recent
**Action**:
aiwg checkpoint recover
**Response**: "Recovering from most recent checkpoint `iteration-3-complete` (ckpt_7b2f1a). Resuming Construction phase, iteration 3, step 12/15. In-progress artifact `.aiwg/working/tests/integration-plan-draft.md` reloaded. Ready to continue."
**User**: "Recover from checkpoint ckpt_9f20de"
**Extraction**: Recover subcommand, ID `ckpt_9f20de`
**Action**:
aiwg checkpoint recover ckpt_9f20de
**Response**: "Recovering from checkpoint `ckpt_9f20de` (auto, 2026-03-29 14:17:33). Resuming Construction phase, iteration 2, step 15/15. No in-progress artifacts. Ready to continue from this position."
If the user's intent is ambiguous:
Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.
Repo: jmagly/aiwg
Crash-resilient external agent loop with state persistence and CI/CD integration
Detect requests for iterative autonomous agent loops and route to the appropriate loop executor
Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
Enable agent loops to learn from similar past tasks and share patterns across loops
Query and manage the executable feedback debug memory
Execute tests on generated code and iterate until passing