Automatic filesystem snapshots before destructive file operations,
with user-facing rollback. Inspired by PR #559 (by @alireza78a).
Architecture:
- Shadow git repos at ~/.hermes/checkpoints/{hash}/ via GIT_DIR
- CheckpointManager: take/list/restore, turn-scoped dedup, pruning
- Transparent — the LLM never sees it, no tool schema, no tokens
- Once per turn — only first write_file/patch triggers a snapshot
Integration:
- Config: checkpoints.enabled + checkpoints.max_snapshots
- CLI flag: hermes --checkpoints
- Trigger: run_agent.py _execute_tool_calls() before write_file/patch
- /rollback slash command in CLI + gateway (list, restore by number)
- Pre-rollback snapshot auto-created on restore (undo the undo)
Safety:
- Never blocks file operations — all errors silently logged
- Skips root dir, home dir, dirs >50K files
- Disables gracefully when git not installed
- Shadow repo completely isolated from project git
Tests: 35 new tests, all passing (2798 total suite)
Docs: feature page, config reference, CLI commands reference
Browse past sessions (shows title, preview, last active)
hermes sessions rename <id> <title>
Set or change a session's title
hermes sessions export <id>
Export a session
hermes sessions delete <id>
Delete a specific session
hermes sessions prune
Remove old sessions
hermes sessions stats
Show session statistics
Insights
Command
Description
hermes insights
Show usage analytics for the last 30 days
hermes insights --days 7
Analyze a custom time window
hermes insights --source telegram
Filter by platform
Slash Commands (Inside Chat)
Type / in the interactive CLI to see an autocomplete dropdown.
Navigation & Control
Command
Description
/help
Show available commands
/quit
Exit the CLI (aliases: /exit, /q)
/clear
Clear screen and reset conversation
/new
Start a new conversation
/reset
Reset conversation only (keep screen)
Tools & Configuration
Command
Description
/tools
List all available tools
/toolsets
List available toolsets
/model [provider:model]
Show or change the current model (supports provider:model syntax to switch providers)
/provider
Show available providers with auth status
/config
Show current configuration
/prompt [text]
View/set custom system prompt
/personality [name]
Set a predefined personality
Conversation
Command
Description
/history
Show conversation history
/retry
Retry the last message
/undo
Remove the last user/assistant exchange
/save
Save the current conversation
/compress
Manually compress conversation context
/title [name]
Set or show the current session's title
/usage
Show token usage for this session
/insights [--days N]
Show usage insights and analytics (last 30 days)
/compress
Manually triggers context compression on the current conversation. This summarizes middle turns of the conversation while preserving the first 3 and last 4 turns, significantly reducing token count. Useful when:
The conversation is getting long and you want to reduce costs
You're approaching the model's context limit
You want to continue the conversation without starting fresh
Requirements: at least 4 messages in the conversation. The configured model (or compression.summary_model from config) is used to generate the summary. After compression, the session continues seamlessly with the compressed history.
Reports the result as: Compressed: X → Y messages, ~N → ~M tokens.
:::tip
Compression also happens automatically when approaching context limits (configurable via compression.threshold in config.yaml). Use /compress when you want to trigger it early.
:::
Clear input/images, interrupt agent, or exit (contextual)
Ctrl+D
Exit
Tab
Autocomplete slash commands
:::tip
Commands are case-insensitive — /HELP works the same as /help.
:::
:::info Image paste keybindings
Alt+V works in most terminals but not in VSCode's integrated terminal (VSCode intercepts Alt+key combos). Ctrl+V only triggers an image check when the clipboard also contains text (terminals don't send paste events for image-only clipboard). The /paste command is the universal fallback. See the full compatibility table.
:::