Skip to main content
Store AI conversation sessions as organized markdown files in ~/.codearchitect/sessions/. Creates a topic-named folder with summary.md and full.md files for better organization. Recommended workflow: Export chat from Cursor/VS Code to ~/.codearchitect/exports/, then call store_session without parameters - it will auto-detect the export file.

Parameters

conversation
string | Message[]
Optional. Conversation text or JSON array of messages. If not provided, tool automatically looks for export file in ~/.codearchitect/exports/.
exportFilename
string
Optional. Pattern to match specific export file (case-insensitive). Example: "resolve_mcp" matches cursor_resolve_mcp_configuration_issues.md or auth-implementation.json. If not provided, uses newest export file (modified in last 10 minutes).
topic
string
Optional session topic. Auto-extracted if not provided.
format
string
default:"plain"
"plain" for text, "messages" for JSON array. Default: "plain".
projectDir
string
Optional. Project directory path. If specified, saves to BOTH main folder (~/.codearchitect/sessions/) AND project folder (project/.codearchitect/sessions/). Always saves to main folder first.

Response

Success

success
boolean
required
Always true.
summaryFile
string
required
Full path to summary.md file in topic folder.
fullFile
string
required
Full path to full.md file in topic folder.
filename
string
required
Topic folder name (e.g., authentication-implementation).
topic
string
required
Final topic used.
date
string
required
ISO date string.
message
string
required
Success message indicating folder location.

Error

success
boolean
required
Always false.
error
string
required
Error code (see below).
message
string
required
Human-readable error message.

Error Codes

CodeDescription
NO_CONVERSATION_OR_EXPORTNo conversation provided and no recent export file found
INVALID_INPUTMissing or invalid conversation
FILE_WRITE_ERRORCannot write file
DIRECTORY_CREATION_ERRORCannot create directory
UNKNOWN_ERRORUnexpected error

Examples

{
  "name": "store_session",
  "arguments": {}
}
Workflow:
  1. Export chat from Cursor/VS Code to ~/.codearchitect/exports/
  2. Call store_session without parameters
  3. Tool auto-detects and processes export file

With Explicit Topic

{
  "name": "store_session",
  "arguments": {
    "topic": "Authentication Implementation"
  }
}

With Direct Conversation

{
  "name": "store_session",
  "arguments": {
    "conversation": "User: Implement authentication\nAI: Let's use JWT...",
    "topic": "Authentication Implementation"
  }
}
{
  "success": true,
  "summaryFile": "/path/.codearchitect/sessions/2025-11-18/authentication-implementation/summary.md",
  "fullFile": "/path/.codearchitect/sessions/2025-11-18/authentication-implementation/full.md",
  "filename": "authentication-implementation",
  "topic": "authentication-implementation",
  "date": "2025-11-18T14:30:22.123Z",
  "message": "Session saved in folder authentication-implementation: summary.md and full.md"
}

Storage Structure

Sessions are stored in topic-named folders with two files: Main location (always): ~/.codearchitect/sessions/
  • Windows: C:\Users\YourName\.codearchitect\sessions\
  • Linux/Mac: ~/.codearchitect/sessions/
~/.codearchitect/sessions/
└── YYYY-MM-DD/
    └── topic-folder-name/
        ├── summary.md    # Short summary + detailed request/response pairs
        └── full.md       # Complete JSON messages + human-readable format
Optional project location: project/.codearchitect/sessions/ (if projectDir specified) Folder naming:
  • Topic-based folder names (e.g., authentication-implementation)
  • Redundant suffixes automatically removed (-summary, -session, -conversation, -chat)
  • Auto-numbered if folder name collision occurs
Files:
  • summary.md: Quick summary with key points and detailed request/response pairs
  • full.md: Complete conversation as JSON (TOON-optimized) + human-readable format

Limits

  • Conversation size: Max 10MB (truncated to 1MB)
  • Topic length: Max 100 chars (folder name sanitized)
  • Folder collisions: Auto-numbered up to 1000 attempts

Storage Behavior

Main folder (always): ~/.codearchitect/sessions/
  • Always saves here regardless of other settings
  • Reliable location that works across all projects
Project folder (optional): project/.codearchitect/sessions/
  • Only if projectDir parameter is explicitly provided
  • Saves to both main folder AND project folder
Export detection: ~/.codearchitect/exports/
  • Tool automatically looks here for export files
  • Supports both Cursor (.md) and VS Code (.json) formats