Skip to content

sessions

kolega-code sessions manages the local session records that the TUI and ask --save create. Sessions hold the conversation history, the project they belong to, and the model configuration in use.

Terminal window
kolega-code sessions <list|delete|export> [options]

See Settings & API Keys for where session files are stored, and Sessions & Resuming for how resuming works in the TUI.

List saved sessions, optionally filtered to one project.

Terminal window
kolega-code sessions list --project .
OptionDescription
--project <PATH>Only show sessions for this project
--state-dir <PATH>Directory for CLI session state

Each row is tab-separated:

<session_id> <thread_id> <updated_at> <mode> <project_path> <title>

Delete a session by ID.

Terminal window
kolega-code sessions delete <session_id>
Argument / optionDescription
session_idThe session to delete (required)
--state-dir <PATH>Directory for CLI session state

Print a session as JSON, or write it to a file.

Terminal window
kolega-code sessions export <session_id> # to stdout
kolega-code sessions export <session_id> --output run.json
Argument / optionDescription
session_idThe session to export (required)
--output <PATH>Write JSON to a file instead of stdout
--state-dir <PATH>Directory for CLI session state

The exported JSON includes the session metadata, model configuration summary, and full message history — handy for archiving, debugging, or analysis.