Skip to content

Workspace Restoration

Ptah is designed so that closing the app and reopening it feels like resuming, not starting over. Restoration happens automatically on every launch.

ItemScopeRestored?
Active workspaceApp-levelYes
Open chats and scroll positionPer workspaceYes
Chat draftsPer workspaceYes
Expanded file tree nodesPer workspaceYes
Sidebar and panel layoutApp-levelYes
In-flight agent runsPer workspaceNo (cancelled on quit)
Browser automation sessionsApp-levelNo (closed on quit)
Provider auth tokensApp-levelYes (via secure store)
  1. Ptah reads the last active workspace path from settings.
  2. If a CLI argument was passed, that path overrides the stored one.
  3. Ptah validates the folder exists and is readable.
    • On success → workspace opens, chats and layout reload.
    • On failure → welcome screen opens with a “Last workspace unavailable” notice.
  4. The background analyzer compares the analysis cache timestamp to file mtimes and re-scans only what changed.

If you’ve moved a workspace since the last session, Ptah won’t guess where it went. You’ll see the welcome screen and can re-open the folder from its new location — your chat history under .ptah/chats/ moves with the folder, so nothing is lost.

If you’ve deleted the folder, Ptah forgets it from the recent list after the next successful launch.

If you’d rather start from the welcome screen every time, toggle Settings → General → Restore last workspace on launch off.