A session is Bolt’s primary unit of work. Every prompt you send, every file the agent reads or edits, and every tool call the model makes are durably recorded in that session’s history. Because sessions live in a local SQLite database, they survive process restarts, can be listed and queried at any time, and never leave your machine unless you explicitly share or export them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bolt-builder/bolt-cli/llms.txt
Use this file to discover all available pages before exploring further.
All session data is stored locally in a SQLite database on your own machine. Nothing is sent to external servers unless you enable sharing. Use
bolt db path to find the exact database file.Session lifecycle
A session starts the moment you send your first prompt and ends only when you delete it. Between those two points you can freely detach, resume, branch, or hand it off.Create or continue a session
Launch the TUI to start a new session interactively, or pass a prompt to
bolt run to create one non-interactively:Detach and come back later
Close the TUI at any time — the session is persisted automatically. Resume your most recent session with
--continue, or target a specific session by ID with --session:Fork before experimenting
Use
--fork to branch from the current session history before trying a risky change. The fork is an independent session that does not affect the original:Session management commands
List sessions
--format json to get machine-readable output, or -n <N> to limit to the most recent N sessions:
Delete a session
Run flags for session control
These flags are available onbolt run:
| Flag | Alias | Description |
|---|---|---|
--continue | -c | Continue the most recent session |
--session <id> | -s | Continue a specific session by ID |
--fork | Fork the session before continuing (requires --continue or --session) | |
--share | Generate a share URL for the session | |
--title <title> | Set or override the session title |
Exporting sessions
Export a session’s full transcript as JSON:--sanitize flag replaces file paths, code content, tool inputs and outputs, and other potentially sensitive fields with [redacted:kind:id] placeholders — useful for sharing transcripts with teammates or filing bug reports.
Importing sessions
Import a session from a local JSON file or directly from a share URL:Querying the session database
Bolt exposes the underlying SQLite database directly for power users.--format json for JSON output.
Token usage and cost statistics
bolt stats aggregates token usage and cost data across all your sessions:
--models to also show a per-model breakdown of messages, tokens, and cost.