feat: checkpoint, plan mode, compact, and utility commands#19
Open
mxh1999 wants to merge 8 commits intoSafeRL-Lab:mainfrom
Open
feat: checkpoint, plan mode, compact, and utility commands#19mxh1999 wants to merge 8 commits intoSafeRL-Lab:mainfrom
mxh1999 wants to merge 8 commits intoSafeRL-Lab:mainfrom
Conversation
Auto-snapshots conversation state and file changes after each turn. Users can list, restore, and clear checkpoints via /checkpoint and /rewind slash commands. File backups use copy-on-write with incremental snapshots (MAX_SNAPSHOTS=100 sliding window). Also adds reference/ to .gitignore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… throttling - make_snapshot now backs up files as they are AFTER the turn completes, fixing a bug where rewind would delete newly created files instead of restoring them - Add initial snapshot at session start for rewinding to blank state - Throttle: skip snapshot when no files changed and no new messages - Add e2e test covering the full 10-step lifecycle Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a two-phase planning workflow:
- /plan <desc> enters plan mode (read-only except plan file)
- /plan done exits and restores original permissions
- Plan files persist at .nano_claude/plans/{session_id}.md
- System prompt injects plan mode guidance when active
- Writes to non-plan files are silently blocked with helpful message
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add checkpoint and plan mode to feature table, slash command reference, permission modes table, and directory tree. Update contributor guide with checkpoint package docs and test file list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…estore - /compact [focus] manually triggers conversation compaction - Focus instructions guide the LLM summarizer on what to preserve - Auto-compact and manual compact both restore plan file context after compaction when in plan mode - 9-step e2e test with mocked LLM calls Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- /init creates a CLAUDE.md template in cwd (refuses if exists) - /export exports conversation as markdown or JSON - /copy copies last assistant response to clipboard (cross-platform) - /status shows version, model, permissions, session, token usage Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Checks Python version, git, API keys with live connectivity test (validates key against actual API), optional dependencies (rich, Pillow, sounddevice, faster-whisper), CLAUDE.md presence, checkpoint disk usage, and permission mode. Cross-platform safe output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Agent can now autonomously enter/exit plan mode: - EnterPlanMode: switches to read-only mode, creates plan file - ExitPlanMode: presents plan for user approval, restores permissions - Both tools auto-approved in all permission modes (including manual) - System prompt guides agent to use plan mode for complex tasks - 8-step e2e test covering full tool lifecycle Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
chauncygu
added a commit
that referenced
this pull request
Apr 6, 2026
…lity commands - Add v3.05.6 news entry with full feature descriptions (PR #19 by mxh1999) - Update TOC: add Checkpoint System and Plan Mode sections - Update Features table: add checkpoint/plan mode rows, plan permission mode, 36 slash commands, 27 tools - Update permission system table: add plan mode row - Add all 19 new slash commands to the REPL command reference table - Add Checkpoint System section with commands, example, and storage details - Add Plan Mode section: slash command workflow, agent tool workflow, commands table - Update Context Compression section: document /compact with focus instructions - Update Project Structure: add checkpoint/ package and new test files (263+ tests) - Update "Where ClawSpring wins" comparison: mention checkpoint and plan mode - Update Claude Code comparison table: slash commands 23→36, built-in tools 25→27 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Hi, thanks again for the great PR, we’ve merged it. There were a few merge conflicts on our side, so we handled the final merge manually. Really appreciate your contribution and the work you put into this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 10 new slash commands, 2 agent tools, and a checkpoint system, bringing feature coverage from ~35% to ~50% of Claude Code.
Checkpoint system (
checkpoint/package)/checkpointto list,/checkpoint <id>to rewind (files + conversation),/checkpoint clear/rewindalias; 100-snapshot sliding window; initial snapshot at session startPlan mode (slash commands + agent tools)
/plan <desc>enters read-only analysis mode (user-driven)EnterPlanMode/ExitPlanModetools let the agent autonomously enter/exit plan mode for complex tasks.nano_claude/plans/{session_id}.md)Compact command
/compact [focus]manually triggers conversation compactionUtility commands
/init— create CLAUDE.md template in cwd/export [filename]— export conversation as markdown (default) or JSON/copy— copy last assistant response to clipboard (Windows/macOS/Linux)/status— show version, model, provider, permissions, session, token usage, context %/doctor— diagnose installation health: Python, git, API key + live connectivity test, optional deps, CLAUDE.md, checkpoint disk usage, permission modeDocs
New files
checkpoint/package:types.py,store.py,hooks.py,__init__.pytests/test_checkpoint.py— 24 unit teststests/e2e_checkpoint.py— 10-step lifecycle testtests/e2e_plan_mode.py— 10-step permission test (slash commands)tests/e2e_plan_tools.py— 8-step tool lifecycle test (EnterPlanMode/ExitPlanMode)tests/e2e_compact.py— 9-step compaction testtests/e2e_commands.py— 9-step init/export/copy/status testModified files
agent.py—planpermission mode, silent denial, auto-approve plan toolscontext.py—build_system_prompt(config)with plan mode injection + planning sectioncompaction.py— focus instructions, plan context restore,manual_compact()nano_claude.py— 10 new commands, checkpoint init, auto-snapshot, doctor diagnosticstools.py— checkpoint hooks,EnterPlanMode/ExitPlanModetool registrationREADME.md,docs/contributor_guide.mdTest plan
pytest tests/test_checkpoint.py— 24 passedpytest tests/test_compaction.py— 21 passed (no regressions)python tests/e2e_checkpoint.py— 10/10 passedpython tests/e2e_plan_mode.py— 10/10 passed (slash commands)python tests/e2e_plan_tools.py— 8/8 passed (agent tools)python tests/e2e_compact.py— 9/9 passedpython tests/e2e_commands.py— 9/9 passed/doctorlive tested with valid key, invalid key, and no key🤖 Generated with Claude Code