Resume a Session
Continue a previous conversation with full model/agent/history restored
Resume a previous conversation exactly where you left off — same model, same agent, same chat history.
Quick Start
- Find your session ID
bash praisonai session listCopy the session ID from the output table.
- Or skip the id — pick from a list
On an interactive terminal, omit the id to open a picker of recent sessions:
bash praisonai session resumeSelect a session to resume # Title Updated Messages Tokens Cost 1 fix-auth-bug 2026-09-22T14:31:07 12 12,440 $0.0710 2 draft-release 2026-09-22T11:02:44 5 3,120 $0.0180 Session number (0 to cancel):Type a number to resume that session, or
0to cancel. See Interactive Picker. - Resume the session
bash praisonai session resume <session_id>The CLI restores your prior model, agent name, full chat history, and cumulative usage totals, then shows:
╭─ Session Resumed ──────────────────────────────────╮ │ Session: my-assistant │ │ Model: anthropic/claude-3-5-sonnet-latest │ │ Messages restored: 12 │ │ Usage: 12,440 tokens · $0.0710 (3 requests) │ ╰─────────────────────────────────────────────────────╯ --- Restored Conversation --- [user] What is the capital of France? [assistant] Paris.The
Usageline appears only when token/cost data has been accumulated for the session. Cumulative totals keep accumulating from this point — they do not reset. - Continue with a new prompt
bash praisonai session resume <session_id> "What about Germany?"Passes the resumed state directly into the same run path as
praisonai run --session. - 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:bash praisonai session rename <session_id> "fix-auth-bug"The title then surfaces in the
Namecolumn ofsession list. See Session Rename for details. - View transcript only (read-only)
bash praisonai session resume <session_id> --transcriptPrints recent events without restoring state — useful for reviewing a session without continuing it.
Resume into the interactive TUI
The same resume primitive is available on the bare praisonai interactive launch — no need to type /continue inside a cold TUI. As of PR #4943, the interactive TUI auto-persists every conversation, so this primitive now has data to resume against on a fresh install — you no longer need to have previously passed --auto-save:
# Most recent session
praisonai -c
# Specific session id (equivalent to praisonai session resume <id> without a follow-up prompt)
praisonai --session <id>
# Fork non-destructively
praisonai --fork --session <id>The recorded session model is restored, the prior transcript is replayed into scrollback, and the primary agent is wired to the resumed session’s store so your next prompt continues the conversation with full memory of prior turns.
Added in PR #4912 as parity with run --continue / chat --continue. See Interactive TUI → Launching with a resumed session.
Interactive Picker
Omit the session id on an interactive terminal and the CLI opens a picker of recent sessions — no more copy-pasting an opaque id.
The picker fires only when all of these hold: a real TTY, no --json, and no id passed. It lists the same project-scoped sessions as session list (most-recently-updated first, up to 20).
Select a session to resume
# Title Updated Messages Tokens Cost
1 fix-auth-bug 2026-09-22T14:31:07 12 12,440 $0.0710
2 draft-release 2026-09-22T11:02:44 5 3,120 $0.0180
Session number (0 to cancel):Enter a number 1..N to resume that session, or 0 to cancel. Ctrl-C / EOF also cancels.
When it exits without resuming
The picker never silently starts a fresh run. Three cases exit without resuming:
| Case | Message |
|---|---|
| Empty store | No sessions found |
Cancel (0, Ctrl-C, EOF) | Cancelled |
| Listing failure | Could not list sessions: <error> + → Use 'praisonai session list' to inspect the session store |
Non-TTY / --json
Scripts and CI are unaffected — the id stays required. With no id under --json or a non-TTY, the command errors instead of prompting:
Error: Missing session id
→ Pass a session id, or run interactively to pick oneHow It Works
The rehydrate_session() helper searches stores in order and returns a RehydratedSession dataclass:
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class RehydratedSession:
session_id: str
chat_history: list[dict[str, str]] = field(default_factory=list)
model: Optional[str] = None
agent_name: Optional[str] = None
metadata: dict = field(default_factory=dict)
usage: dict = field(default_factory=dict) # cumulative token/cost totals
found: bool = FalseWhen found is False, the CLI prints:
Error: Session not found: <session_id>
→ Use 'praisonai session list' to see available sessionsModel 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:
Restored session model: anthropic/claude-3-5-sonnet-latestPrecedence (first match wins): explicit --model → config agent.model → recorded session model → keyless local-first fallback → default resolution.
Override the recorded model
Pass --model on resume — it wins and becomes the new recorded model for subsequent turns.
praisonai session resume abc123 --model gpt-4o "continue with a different model"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:
praisonai session resume <id>Flags
| Flag | Description |
|---|---|
<session_id> | Session ID to restore — optional on a TTY (omit to open the interactive picker); required in --json / non-TTY |
[PROMPT] | Optional prompt to continue the session immediately |
--transcript | Show transcript only — do not restore state |
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.
# These are equivalent:
praisonai session resume abc123 "next question"
praisonai run --session abc123 "next question"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.
Best Practices
Pin a session ID in scripts for reproducibility
Store the session ID in an environment variable or config file so automation scripts always resume the correct conversation:
SESSION_ID="abc-123-def"
praisonai session resume "$SESSION_ID" "run daily report"Use –transcript only for read-only viewing
--transcript shows events without restoring state, making it safe to inspect a live session from a second terminal without risk of creating conflicting state.
Resume after switching machines
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.
Check session list before resuming
Always run praisonai session list first to confirm the session ID and its message count before resuming — especially after long gaps.
Use the interactive picker for exploratory resume
Omit the id and let the picker surface recent sessions when you’re browsing rather than resuming a known id. Scripts and CI should still pass an explicit id — the picker never fires under --json or a non-TTY.