Skip to main content
Session manifests let praisonai run tell you when a previous run on the same session was interrupted.

Quick Start

1

Nothing to enable

Every praisonai run on a session already writes the marker — no setup required.
Auto-saved runs (no --session) are tracked too. Only --no-save runs without a session skip the manifest.
2

See an interrupted run surface

If the run dies before finishing, the next launch on that session warns you:
After 3 interrupted attempts at the same task, the stale run is abandoned and the counter restarts at 1.

How It Works

praisonai run writes a “run in flight” marker before the agent starts and clears it in its finally block.

Configuration

The manifest has no settings to turn on; advanced users can drive it directly from praisonaiagents.session.

FileSessionManifest

SessionManifestProtocol is the runtime-checkable protocol these methods define. DEFAULT_MAX_ATTEMPTS = 3.

ManifestEntry


Common Patterns

Retry an interrupted run

Re-issue the same prompt — the matching digest counts it as the next attempt.

Start a different task on the same session

A different prompt is a new task, so attempt restarts at 1.

Use FileSessionManifest from a custom runner

A crash or Ctrl+C skips both end_run calls, so the marker survives for the next launch.

Best Practices

Re-issuing is always safe; the run just counts up attempt.
The session id becomes part of the manifest filename (sanitised, but visible).
The manifest file keeps only a SHA-256 digest of the prompt. Conversation history saved by the session store is separate and still contains your messages.
After max_attempts (default 3), the stale run is abandoned and the attempt counter restarts. Change the budget per call via FileSessionManifest.begin_run(..., max_attempts=N).

Session Resume

Continue conversation history across sessions.

Persistence Overview

How PraisonAI stores conversation, state, and knowledge.