Chat History
How Cosmo persists your chat sessions across restarts and syncs them to the cloud.
Overview
Every conversation you have in Cosmo is automatically saved. Sessions survive app restarts and, when you're signed in, are synced to the cloud so your history follows you across devices.
How sessions are saved
- Locally — sessions are written to disk after every message, title update, or model change.
- Cloud sync — when authenticated, every mutation is async-pushed to the server. On the next sign-in or app restart, sessions are pulled from the server first, so the cloud copy always wins.
Offline and orphan recovery
Sessions created while offline (or before you first signed in) are pushed to the server the next time you authenticate. No history is silently lost.
Sessions that are never synced
Two session types are intentionally kept local only:
| Type | Why |
|---|---|
| Hidden sessions | Internal sessions used by background processes |
| Onboarding sessions | The first-run welcome conversation |
Switching accounts or orgs
When you sign in as a different user or switch to a different organisation, local session history is cleared before loading the new account's sessions from the server. Re-authenticating as the same user (e.g. a token refresh) preserves your history.
Renaming a session
Every session starts with a title Cosmo generates automatically from your first message. To change it, hover a session in the sidebar, open the "···" menu, and choose Rename — the title becomes an editable field pre-filled with the current name.
- Press Enter or click the checkmark to save; press Escape or click the × to discard your change and keep the old name.
- A blank name is rejected with an inline message — the old name is never silently lost.
- Names are limited to 100 characters; a long name still truncates with an ellipsis in the sidebar, with the full name available on hover.
- The new name is synced to the server immediately, so it survives a restart and follows you to other devices, just like the rest of your chat history.
- Only one session can be renamed at a time; starting a rename on another row discards an unsaved edit in progress.
- Renaming only changes the title shown in the sidebar — it never affects the conversation itself.
Deleting a session
Deleting a session from the sidebar soft-deletes it on the server. Deleted sessions are not recoverable from the UI — there is no trash for chat sessions.