/checkpoint - Session & Agent Checkpoint Creation
Create checkpoints for session continuity and autonomous agent handoffs. Supports two modes:
- Session Mode (default): Timestamped markdown documents for git commit
- Agent Mode (
--agent): Structured checkpoints for Ralph Wiggum autonomous agent loops (ADR-108)
Usage
Session Mode (Default)
# Create checkpoint with description
/checkpoint "Sprint 3 complete"
# Create checkpoint with auto-commit
/checkpoint "Feature implementation done" --auto-commit
# Create checkpoint without git commit
/checkpoint "WIP snapshot" --no-commit
# Include submodule updates
/checkpoint "Multi-repo sync" --with-submodules
# Project-scoped checkpoint (ADR-159)
/checkpoint "Customer milestone" --project CUST-avivatec-fpa
Agent Mode (ADR-108)
# Create agent checkpoint for current task
/checkpoint --agent --task-id H.8.1.8
# Create checkpoint with completed items
/checkpoint --agent --task-id A.9.1.3 --completed "API endpoint" "Unit tests"
# Create checkpoint with pending items
/checkpoint --agent --task-id B.4.2 --pending "UI integration" --focus "Button component"
# Create checkpoint with explicit phase
/checkpoint --agent --task-id H.8.5.4 --phase implementing
# Project-scoped agent checkpoint (ADR-159)
/checkpoint --agent --task-id H.8.1.8 --project PILOT
# View latest checkpoint for a task
/checkpoint --agent --task-id H.8.1.8 --show
# List checkpoint history for a task
/checkpoint --agent --task-id H.8.1.8 --history
System Prompt
System Prompt
⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:
- IMMEDIATELY execute - no questions, no explanations first
- ALWAYS show full output from script/tool execution
- ALWAYS provide summary after execution completes
DO NOT:
- Say "I don't need to take action" - you ALWAYS execute when invoked
- Ask for confirmation unless
requires_confirmation: truein frontmatter - Skip execution even if it seems redundant - run it anyway
The user invoking the command IS the confirmation.
You are executing the CODITECT checkpoint creation system.
Detect Mode:
- If
--agentflag is present → Agent Mode (Ralph Wiggum ADR-108) - Otherwise → Session Mode (default)
ADR-159 Project Scoping:
When --project is provided (or auto-detected from $CODITECT_PROJECT or CWD), checkpoints are scoped to the project:
- Session mode: checkpoint metadata includes
projectfield - Agent mode: checkpoints stored under project-specific subdirectory
from scripts.core.scope import resolve_scope
scope = resolve_scope() # Auto-detects from CWD / $CODITECT_PROJECT
# scope.project = "PILOT" or "CUST-avivatec-fpa" etc.
Session Mode (Default)
Storage Location:
- Checkpoints:
context-storage/checkpoints/ - Project-scoped:
context-storage/checkpoints/{project}/ - Format:
YYYY-MM-DDTHH-MM-SSZ-{description}.md
Checkpoint Contents:
- Session summary and work completed
- Git status and recent commits
- Updated TASKLIST references
- Next steps and context for continuation
- Optional: Submodule pointer updates
- Dashboard refresh: Phase 1+2 for dashboard-enabled projects (ADR-170)
Execute the checkpoint creation script:
python3 scripts/create-checkpoint.py "$DESCRIPTION" $ARGS
For multi-submodule repositories:
python3 scripts/checkpoint-with-submodules.py "$DESCRIPTION" $ARGS
Agent Mode (--agent flag)
Storage Location:
- Checkpoints:
~/PROJECTS/.coditect-data/checkpoints/{task_id}/ - Project-scoped:
~/PROJECTS/.coditect-data/checkpoints/{project}/{task_id}/ - Format: JSON with integrity hash (SHA-256)
Checkpoint Contents (ADR-108):
- Metadata: checkpoint_id, task_id, agent_id, iteration, timestamp
- Execution State: phase, completed/pending/blocked items, current_focus
- Context Summary: key_decisions, assumptions, constraints, dependencies
- Metrics: tokens_consumed, tools_invoked, files_modified, test_status
- Recovery Info: last_successful_state, rollback_instructions, continuation_prompt
- Compliance: event_log_ref, hash, signature, retention_policy
Execute the agent checkpoint script:
python3 scripts/core/checkpoint-command.py \
--task-id "$TASK_ID" \
--agent-id "claude-$(date +%Y%m%d-%H%M%S)" \
--phase "$PHASE" \
--completed "$COMPLETED_ITEMS" \
--pending "$PENDING_ITEMS" \
--focus "$CURRENT_FOCUS" \
--project "$PROJECT"
Agent Checkpoint Actions:
--show: Display latest checkpoint for task--history: List checkpoint history (newest first)--resume: Generate continuation prompt from latest checkpoint
Options
Session Mode Options
| Option | Description |
|---|---|
DESCRIPTION | Required. Sprint/work description (max 200 chars) |
--auto-commit | Automatically commit checkpoint to git |
--no-commit | Create checkpoint file without git commit |
--with-submodules | Use checkpoint-with-submodules.py for multi-repo |
--repo-root PATH | Custom repository root directory |
--project ID | Project scope for checkpoint (ADR-159). Auto-detected from CWD if not set. |
Agent Mode Options
| Option | Description |
|---|---|
--agent | Enable agent mode (ADR-108 Ralph Wiggum) |
--task-id ID | Required. Task identifier (e.g., H.8.1.8) |
--agent-id ID | Optional. Agent identifier (auto-generated if not provided) |
--iteration N | Loop iteration number (default: auto-increment) |
--phase PHASE | Execution phase: planning, implementing, testing, reviewing, handoff, complete |
--completed ITEM... | Items completed in this iteration |
--pending ITEM... | Items still pending |
--blocked ITEM... | Items blocked by dependencies |
--focus ITEM | Current work focus |
--decision TEXT | Key decision made (can specify multiple) |
--show | Display latest checkpoint for task |
--history | List checkpoint history |
--resume | Generate continuation prompt from latest checkpoint |
--project ID | Project scope for checkpoint (ADR-159). Auto-detected from CWD if not set. |
Examples
Basic Checkpoint
/checkpoint "Implemented user authentication"
Result: Creates timestamped checkpoint in context-storage/checkpoints/
Auto-Commit Checkpoint
/checkpoint "Sprint 3 complete" --auto-commit
Result: Creates checkpoint AND commits to git with standard message
Multi-Submodule Checkpoint
/checkpoint "Cross-repo sync" --with-submodules
Result: Commits all modified submodules, updates parent repo, creates audit trail
WIP Snapshot
/checkpoint "WIP: halfway through refactoring" --no-commit
Result: Creates checkpoint file only (useful for temporary snapshots)
Checkpoint Document Format
# Session Checkpoint: {timestamp}
## Sprint: {description}
## Work Completed
- [Extracted from git diff and status]
## Git Status
- Branch: main
- Recent commits: [list]
- Uncommitted changes: [list]
## Updated Files
- [List of modified files with summary]
## Next Steps
1. [Auto-extracted from context]
2. [Pending tasks from TASKLIST]
## Context for Next Session
- Key decisions made: [list]
- Important files touched: [list]
- Dependencies added: [list]
---
Generated: {timestamp}
Script: create-checkpoint.py
Framework: CODITECT
Workflow
# End of session workflow
/export # Export conversation
/cx # Process and index
/checkpoint "Session work" --auto-commit # Create checkpoint
Before next session:
# Resume from checkpoint
cat context-storage/checkpoints/$(ls -t context-storage/checkpoints/ | head -1)
Integration
Works with:
/export- Export session before checkpoint/cx- Process exports into unified store/git-sync- Full repository synchronization/commit- Simple git commit workflow
Scripts:
scripts/create-checkpoint.py- Single repo checkpointsscripts/checkpoint-with-submodules.py- Multi-submodule checkpoints
Storage:
- Checkpoints:
context-storage/checkpoints/ - Audit logs:
context-storage/audit-logs/(for submodule checkpoints)
Safety Features
- Input validation (no shell injection)
- Git state backup before operations
- Automatic rollback on failure
- Network retry logic for push operations
- Detailed audit trail for multi-repo checkpoints
Success Output
When checkpoint creation completes:
✅ COMMAND COMPLETE: /checkpoint
Description: "<description>"
File: context-storage/checkpoints/YYYY-MM-DDTHH-MM-SSZ-description.md
Git: <committed|not-committed>
Submodules: <updated|skipped>
Completion Checklist
Before marking complete:
- Checkpoint file created
- Git status captured
- Next steps documented
- Git commit (if --auto-commit)
Failure Indicators
This command has FAILED if:
- ❌ Checkpoint directory not writable
- ❌ Git repository not found
- ❌ Script execution error
- ❌ Submodule sync failed (if --with-submodules)
When NOT to Use
Do NOT use when:
- No significant work to checkpoint
- Already created checkpoint recently
- Need quick save (use git stash)
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Vague description | Hard to find later | Use descriptive checkpoint names |
| Skip at session end | Lost context | Always checkpoint before stopping |
| Forget --with-submodules | Incomplete state | Use for multi-repo work |
Principles
This command embodies:
- #3 Complete Execution - Full state capture
- #9 Based on Facts - Git-based evidence
- #6 Clear, Understandable - Structured checkpoint format
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Scripts: scripts/create-checkpoint.py, scripts/checkpoint-with-submodules.py, scripts/core/checkpoint-command.py
ADR References: ADR-108 (Agent Checkpoints), ADR-159 (Multi-Tenant Command Architecture), ADR-170 (Dashboard Refresh)
Version: 2.2.0
Last Updated: 2026-02-16
Changelog:
- v2.2.0 - ADR-170: Dashboard Phase 1+2 refresh on checkpoint for dashboard-enabled projects (session end = fresh dashboard for next session)
- v2.1.0 - ADR-159: Project-scoped checkpoints, agent mode enhancements