Skip to main content
Resume a previous conversation exactly where you left off — same model, same agent, same chat history.

Quick Start

1

Find your session ID

Copy the session ID from the output table.
2

Resume the session

The CLI restores your prior model, agent name, full chat history, and cumulative usage totals, then shows:
The Usage line appears only when token/cost data has been accumulated for the session. Cumulative totals keep accumulating from this point — they do not reset.
3

Continue with a new prompt

Passes the resumed state directly into the same run path as praisonai run --session.
4

Give the session a friendly title (optional)

Rename the session so it’s easy to spot in session list — the id you resume with never changes:
The title then surfaces in the Name column of session list. See Session Rename for details.
5

View transcript only (read-only)

Prints recent events without restoring state — useful for reviewing a session without continuing it.

How It Works

The rehydrate_session() helper searches stores in order and returns a RehydratedSession dataclass:
When found is False, the CLI prints:

Model Restoration

Resuming restores the model the session was running with — not the current default. Change your default model between runs and a resumed session still runs on the original model. When the recorded model is used, the CLI prints:
Precedence (first match wins): explicit --model → config agent.modelrecorded session model → keyless local-first fallback → default resolution.
The recorded-model lookup runs before the keyless local-first credential gate. A resumed cloud session on a machine with a reachable local endpoint (Ollama, LM Studio) is no longer silently switched to the local model. See PraisonAI #3685.

Override the recorded model

Pass --model on resume — it wins and becomes the new recorded model for subsequent turns.

Where the model comes from

The store resolves the recorded model in this order: the session-level metadata["model"] (written by the session-continuity path), then the model on the most recent turn that recorded one. When neither exists, restoration is skipped and normal default resolution applies.

Legacy sessions

Sessions written by older PraisonAI versions stored model / llm as top-level fields rather than under metadata. The store folds those legacy fields back into metadata on load, so historical sessions recover their recorded model on resume without any migration step. Existing metadata values always win over the mirrored top-level value.

Cumulative Usage Across Resumes

Token and cost totals accumulate across all runs for a session. When you resume and run more prompts, the totals grow — they are never reset. The store that already holds usage metadata takes priority on resume — a globally-stored session resumed via the project store keeps its original totals intact.

Project vs Global Store

The resume helper always searches the project-scoped store first, then falls back to the global default store. This means sessions created inside a project are resolved with higher priority, and you can still resume cross-project sessions by ID. The project_path parameter (optional, defaults to cwd) controls which project store is searched first. Use it when running resume from a different working directory:

Flags


Relation to run --continue / run --session

praisonai session resume and praisonai run --session <id> call the same rehydrate_session() helper under the hood. The outcomes are identical: same chat history, same model, same agent. Use whichever form fits your workflow.
As of the fix for PraisonAI #2655, run --continue also searches both stores when finding the last session — before, only session resume did. As of praisonai/PraisonAI#3203, both the resume path and the show/delete/export path enumerate the same store instances (same classes, same order) by delegating to a single canonical_cli_stores() helper — so an id you can resume is guaranteed to also be show-able, delete-able, and export-able.
For the memory-driven resume path (different code path, uses DefaultSessionStore memory layers), see Session Resume in Persistence.

Best Practices

Store the session ID in an environment variable or config file so automation scripts always resume the correct conversation:
--transcript shows events without restoring state, making it safe to inspect a live session from a second terminal without risk of creating conflicting state.
The global store covers cross-machine cases when the same project root is checked out. Sessions written to the project-scoped store travel with the project directory.
Always run praisonai session list first to confirm the session ID and its message count before resuming — especially after long gaps.

Session List

View and manage all sessions

Session Rename

Give a session a friendly title for easy scanning

Run Command

praisonai run —session and —continue flags

Session Persistence

How sessions are stored and retrieved

Memory-based Session Resume

The memory-driven session resume path