Skip to content

feat: session state serialization (Pause/Resume) #14

@rosspeili

Description

@rosspeili

Problem Statement

If a user exits the terminal or the process is interrupted, the entire state of a multi-turn session is lost. There is currently no way to "pause" a long-running debate and resume it later with the exact same agent states, history, and configuration.

Proposed Solution

  1. Implement to_dict() and from_dict() methods for the Session class in session.py.
  2. This should capture the full SessionConfig, the state of all Agent instances, the entire conversation history, and metadata like turn_count.
  3. Add a CLI command or a post-session option to "Save Snapshot" which writes this state to a JSON file.
  4. Update the CLI wizard to allow "Resuming from Snapshot" by loading one of these JSON files.

Alternatives Considered

Database-backed persistence, but JSON serialization matches our current local-first, file-based storage philosophy.

Priority

Low 🟢

Additional Context

Crucial for complex projects, multi-day simulations, or research tasks that span more than one sitting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions