Session Export

Serializes current session state, thought history, and memory data into structured JSON files for persistence.

felipecustodio 6c8ca9c 3 files · 3.1 KB Updated

File contents

Overview & Purpose

Session Export serializes the active session context into structured JSON format to disk, allowing state persistence across tool calls or subagents.

When to Use

  • State Persistence: Saving progress before long background operations.
  • Hand-off to Subagents: Exporting context for sibling or child subagents.

Execution Workflow

  1. Gather Session Memory: Collect active thoughts, variables, and metadata.
  2. Execute Export Script: Call scripts/session_export.py --file <path> --data <json_string>.
  3. Verify File Creation: Confirm the JSON target file was created cleanly.

Expected Output Contract

### Session Export Complete
- **Target File**: [File Path]
- **Export Status**: [Success / Failed]

Scripts

  • scripts/session_export.py - Deterministic evaluation, state validation, and CLI tool for session-export.

Gotchas

  • Ensure payload JSON is properly escaped when passed via command line flags.

felipecustodio/clear-thought-skills/tree/main/skills/session-export commit 6c8ca9c290

Frequently asked questions

npx skillmds@latest add felipecustodio/session-export