Skip to content

feat: checkpoint list/info CLI commands#5319

Merged
greysonlalonde merged 10 commits into
mainfrom
feat/checkpoint-cli
Apr 7, 2026
Merged

feat: checkpoint list/info CLI commands#5319
greysonlalonde merged 10 commits into
mainfrom
feat/checkpoint-cli

Conversation

@greysonlalonde

@greysonlalonde greysonlalonde commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • crewai checkpoint list [location] — lists all checkpoints with timestamp, size, and task completion summary
  • crewai checkpoint info [path] — shows details of a single checkpoint or the latest in a directory, including per-task status
  • Reads checkpoint JSON metadata without full deserialization

Depends on #5318.

Test plan

  • crewai checkpoint list ./checkpoints shows all files
  • crewai checkpoint list defaults to ./.checkpoints
  • crewai checkpoint info ./checkpoints shows latest
  • crewai checkpoint info ./checkpoints/specific.json shows that file
  • Empty directory prints "No checkpoints found"

Note

Low Risk
Low risk: additive, read-only CLI functionality that inspects local JSON/SQLite checkpoint files without modifying runtime behavior or persisted data.

Overview
Introduces a new crewai checkpoint CLI group with list and info commands for inspecting saved checkpoints.

The implementation adds checkpoint_cli.py, which detects whether a location is a JSON directory or a SQLite DB, extracts lightweight metadata (timestamp, event count, trigger type, and per-entity task completion), and prints either a summary list or detailed per-task status for the latest checkpoint or a specified db_path#checkpoint_id.

Reviewed by Cursor Bugbot for commit 7ccf811. Bugbot is set up for automated code reviews on this repo. Configure here.

greysonlalonde and others added 5 commits April 8, 2026 00:49
…ders

- Rename CheckpointConfig.directory to location — the field means a
  directory for JsonProvider and a database file path for SqliteProvider,
  so the generic name fits both
- Add max_checkpoints to BaseProvider protocol
- Add max_checkpoints and pruning to JsonProvider, matching SqliteProvider
- Remove prune logic from checkpoint_listener since providers own cleanup
crewai checkpoint list [location] — lists all checkpoints with
timestamp, size, and task completion summary.

crewai checkpoint info [path] — shows details of a single checkpoint
or the latest in a directory, including per-task status.
@github-actions github-actions Bot added the size/M label Apr 7, 2026
Comment thread lib/crewai/src/crewai/cli/checkpoint_cli.py
Base automatically changed from refactor/checkpoint-api-cleanup to main April 7, 2026 17:13
Comment thread lib/crewai/src/crewai/state/provider/core.py Fixed
@github-actions github-actions Bot added the size/L label Apr 7, 2026

@iris-clawd iris-clawd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Checkpoint CLI

Clean, read-only CLI addition. Nice dual JSON/SQLite support with auto-detection via magic bytes.

Minor notes (non-blocking)

  • _info_json_latest and _info_json_file will propagate exceptions uncaught (unlike _list_json which has a try/except). info_checkpoint catches for specific file but not for latest-in-directory. Consistency thing.
  • _SELECT_ALL deserializes every checkpoint's json(data) to build the list. For large DBs with big payloads this could be slow. A SELECT id, created_at, length(data) FROM checkpoints would be lighter for the list view, then only deserialize when showing info. Fine for now.
  • json(data) in the SQL assumes the column stores JSON text. If it's JSONB (per PR #5318's mention of JSONB), you may need json_extract or just read the raw column.

All minor — good to land. ✅

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7ccf811. Configure here.

Comment thread lib/crewai/src/crewai/cli/checkpoint_cli.py
Comment thread lib/crewai/src/crewai/cli/checkpoint_cli.py
@greysonlalonde greysonlalonde merged commit a5df7c7 into main Apr 7, 2026
49 checks passed
@greysonlalonde greysonlalonde deleted the feat/checkpoint-cli branch April 7, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants