💾 Session Commands

Commands for managing conversation history and sessions.

/session

Manage autosave sessions - list, save, load, or delete.

/session

# Opens interactive session manager

/compact

Summarize and compact conversation history to save tokens. Useful for long sessions.

/compact

# Compresses history while preserving context
# Great for staying under token limits
💡 When to Compact

Use /compact when you notice responses slowing down or if you're working on a long task. It summarizes earlier conversation while keeping recent context.

/truncate

Truncate conversation history to a specified number of messages.

/truncate

# You'll be prompted for number of messages to keep

/autosave_load, /resume

Load a previously autosaved session.

/autosave_load
/resume

# Shows list of saved sessions to choose from

/dump_context

Save current conversation history to a file.

/dump_context

# Saves to ~/.code_puppy/sessions/
# You'll be prompted for a filename

/load_context

Load a previously saved conversation from file.

/load_context

# Lists available saved contexts
# Select one to restore the conversation

Session Workflow

Here's a typical workflow using session commands:

Starting Fresh

# Start a new session
code-puppy

# Work on your task...
"Create a REST API for user management"

# Session is automatically saved (if autosave is on)

Resuming Work

# Next day, resume where you left off
code-puppy
/resume

# Select your previous session
# Continue working with full context

Managing Token Limits

# After a long conversation
/compact

# Or if you want to start fresh but keep some history
/truncate

Saving Important Context

# Save current state for later
/dump_context

# Enter a descriptive name
"user-api-implementation-v1"

Autosave Settings

Configure autosave behavior:

# Enable autosave
/set autosave true

# Sessions are saved to:
# ~/.code_puppy/sessions/