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, Codex, and Gemini CLI.
This endpoint assumes the backend machine can read the session files
directly, so it is a local-host import surface. Remote-safe capture should
use nmem t save --from ... from the client machine instead.
Args: request: Session save request with client, project_path, and options
Returns: SessionSaveResponse with results for each processed session
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response 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",
"input": null,
"ctx": {}
}
]
}