Copied to clipboard

Managing Session History

Navigate and resume conversations from any point in your stored history. Checkout specific conversation states to branch, replay, or continue from previous turns.

Prerequisites

tapes API Server For fetching conversation history from storage
SQLite Database For persistent storage of conversations
tapes Proxy (optional) For resuming conversations with chat command

History Management Guide

Step 1: Start the API server

The API server provides access to stored conversations:

tapes serve

Automatically targets Ollama on localhost. Add --sqlite ./tapes.sqlite for persistent storage. Run tapes init in a project directory to create a local .tapes/ folder for project-specific state.

Step 2: Check current status

View your current checkout state:

tapes status

If no checkout state exists, the next chat session will start a new conversation.

Step 3: Find a conversation hash

Use semantic search to find relevant conversation points. See the Search guide for details on setting up and using search:

tapes search "logging configuration" \
  --vector-store-provider chroma \
  --vector-store-target http://localhost:8000 \
  --embedding-provider ollama \
  --embedding-target http://localhost:11434 \
  --embedding-model nomic-embed-text \
  --sqlite ./tapes.sqlite

Search results include the hash for each matched conversation turn. Copy the hash of the point you want to resume from.

Step 4: Checkout a conversation point

Checkout a specific conversation turn to set it as your starting point:

tapes checkout abc123def456

This displays the full conversation history up to that point. To clear the checkout and start fresh:

tapes checkout

Step 5: Resume conversation with chat

Start an interactive chat session that resumes from your checkout state:

tapes chat

Automatically connects to the proxy on localhost:8080. Use --model to override the default model. The chat command always starts from your current checkout state—re-running doesn't advance the checkout.

Understanding Checkout State

The checkout system enables powerful conversation management:

Hash Unique identifier for a specific conversation turn
Messages Complete conversation history from root to checked-out point
Persistence Checkout state remains until explicitly changed or cleared
Branching Continue from any point to create alternative conversation paths

Common Workflows

Creating conversation branches

Checkout a specific point and continue with different prompts to explore alternative paths through the conversation tree.

Testing different responses

Checkout the same starting point multiple times to test how different models or prompts handle the same context.

Reviewing before continuing

Use tapes status to review the conversation history before resuming, ensuring you understand the context.

Project-specific contexts

Use tapes init in different project directories to maintain separate conversation histories per project.

Next Steps

Combine history management with semantic search to find and resume relevant conversations. See the Search guide to learn how to search your conversation history by meaning.

Last updated: