Session Management
import { Card, CardGrid } from ‘@astrojs/starlight/components’;
Session Management
Section titled “Session Management”Every conversation you have with Ptah is a session — a persistent, on-disk record of messages, tool calls, agent handoffs, and metadata. Sessions never disappear when you close the app, never fight over context, and can be searched, analyzed, and resumed weeks later.

Why sessions matter
Section titled “Why sessions matter”- Nothing is lost. Close your laptop mid-refactor; reopen it tomorrow; the chat is right where you left it.
- Context stays isolated. A session for “add dark mode” doesn’t get polluted by your “debug payment webhook” chat.
- Work is measurable. Token counts, costs, and quality scores roll up per session so you can see what’s actually happening.
- History is yours. All transcripts live locally on disk. No cloud required.
Where sessions live
Section titled “Where sessions live”<workspace-root>/.ptah/sessions/Each session is a JSON file containing the full transcript plus a sidecar metadata record. Sessions are scoped to the workspace they were created in, so switching workspaces swaps the session list.