Quick Start
Resume the session
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.Continue with a new prompt
praisonai run --session.How It Works
Therehydrate_session() helper searches stores in order and returns a RehydratedSession dataclass:
found is False, the CLI prints:
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. Theproject_path parameter (optional, defaults to cwd) controls which project store is searched first. Use it when running resume from a different working directory:
Flags
| Flag | Description |
|---|---|
<session_id> | Session ID to restore (required) |
[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.
run --continue also searches both stores when finding the last session — before, only session resume did.
For the memory-driven resume path (different code path, uses
DefaultSessionStore memory layers), see Session Resume in Persistence.Best Practices
Pin a session ID in scripts for reproducibility
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:
Use --transcript only for read-only viewing
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
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
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.Related
Session List
View and manage all sessions
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

