Save Session
Save coding session(s) as conversation thread(s).
Auto-detects sessions from project_path. Creates new thread or appends to existing (with deduplication). Supports Claude Code and Codex.
Args: request: Session save request with client, project_path, and options
Returns: SessionSaveResponse with results for each processed session
Request Body
application/json
client*string
Client type: 'claude-code' or 'codex'
Match
^(claude-code|codex)$project_path*string
Project working directory path
persist_mode?string
Mode: 'current' (most recent session) or 'all' (all sessions)
Default
"current"Match
^(current|all)$session_id?string|null
Session ID (Codex only, optional)
summary?string|null
Brief session summary (1-2 sentences)
truncate_large_content?boolean
Truncate large tool results >10KB
Default
falseResponse Body
application/json
application/json
curl -X POST "http://127.0.0.1:14242/threads/sessions/save" \ -H "Content-Type: application/json" \ -d '{ "client": "string", "project_path": "string" }'{
"status": "string",
"client": "string",
"project_path": "string",
"persist_mode": "string",
"results": [
{
"action": "string",
"session_id": "string",
"thread_id": "string",
"message_count": 0,
"messages_added": 0,
"file": ""
}
],
"error": "string",
"hint": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}