Skip to content

Session export ​

Use mogick sessions export <session-id> to export persisted history for review or handoff. Find the ID with mogick sessions list.

Export text or JSON ​

powershell
# Replace with an actual ID from mogick sessions list
$mogickSessionId = "replace-with-actual-session-id"

# Readable transcript, including tool calls and results
mogick sessions export $mogickSessionId

# Structured history
mogick sessions --json export $mogickSessionId > history.json

The default output is a readable transcript. --json produces one JSON object with sessionId and entries. Entries can include text, tool calls and results, attachments, and image references. An export is not a backup of every referenced file.

--json belongs to sessions. Use shell redirection to save output; a filename extension does not select its format. Check exports for sensitive code, paths, and tool arguments before sharing.

History versus run events ​

Entry pointOutput
sessions exportReadable persisted history
sessions --json exportOne JSON history object
run --jsonJSONL events for the current run, one object per line

See One-shot execution. In 26.9.11, history export does not offer the separate context, protocol, Git, or subagent audit modes listed in older documentation. Inspect changes and findings with Changes and Review.

Export failures ​

Check the workspace, effective data directory, and session ID. Profiles and release channels can use separate databases; see Data directories.

An evidence_incomplete error means a tool call has no matching result in history. The CLI refuses to export that history as complete. As the error suggests, a subsequent prompt in the resumed session can trigger history repair before another export attempt. This continues the session and may invoke models or tools; it is not a read-only export retry.

History exports do not include the complete database, external content, and configuration. They do not replace a data backup.