Sessions
Managing conversation sessions and history
Ripperdoc maintains session history to enable context-aware conversations and session resumption.
Session Storage
Sessions are stored in ~/.ripperdoc/sessions/ as JSON files containing:
- Full conversation transcript
- Tool execution history
- Token usage and costs
- Session metadata
Resuming Sessions
Resume a previous session:
ripperdoc --resumeThis opens an interactive picker to select from recent sessions.
Resume a specific session:
ripperdoc --resume SESSION_IDSession Commands
View Status
> /statusShows current session information including:
- Message count
- Token usage
- Duration
- Tool calls
View Statistics
> /statsShows detailed session statistics:
- Input/output tokens
- Cache hits
- Cost breakdown
- Tool usage breakdown
View Costs
> /costShows token usage and estimated costs.
Context Management
Clearing History
Clear the current conversation:
> /clearThis starts a fresh conversation while keeping the session.
Compacting History
When the context window fills up, Ripperdoc automatically compacts the conversation by summarizing older messages.
Manually trigger compaction:
> /compactSession Configuration
Configure session behavior in .ripperdoc/config.json:
{
"memory": {
"compact_after_turns": 50
}
}Options
| Option | Description | Default |
|---|---|---|
compact_after_turns | Turns before auto-compact | 50 |
Context Length Handling
When the context window is exceeded:
- Ripperdoc detects the context length error
- Automatically compacts older messages
- Retries the request with the compacted context
- Notifies you if compaction was performed
Exporting Sessions
Session files are stored as JSON and can be:
- Backed up manually
- Analyzed for usage patterns
- Shared for debugging
Best Practices
- Use
/clearfor new tasks: Start fresh when switching to unrelated work - Monitor
/costfor long sessions: Keep track of token usage - Resume when interrupted: Use
--resumeto continue interrupted work - Compact proactively: Use
/compactif responses slow down