cli/enable: gate import offer on checkpoint policy; don't auto-import non-interactively

main

Commit

computermode2mo ago

Two fixes from PR review:

  • Validate the checkpoint policy before importing agent history, matching the standalone entire import command's ensureCheckpointPolicyAllowsCheckpointData check. Best-effort: an unsupported/unreadable policy skips the import (logged + noted) rather than failing enable.
  • Only auto-import all eligible agents under an explicit --yes ("accept all defaults"). A non-interactive enable without --yes (script, pipe, or an agent with no TTY) no longer silently imports history; it points at entire import instead.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com Entire-Checkpoint: 01KWWDN6KCZAM8GGPP06D8A1HD

Checkpoints

Improve Single-Agent Import Confirmation UX

Claude CodeOpus 4.8
View session
Checkpoint 1