
Factory AI Droid Chat History: Where Sessions Live and How to Export Them (2026)
Where Factory Droid saves chat history on macOS, Linux, and Windows, plus three export patterns to turn a session into clean, readable markdown.
Factory makes a coding agent called Droid that runs sessions across your repo, your terminal, and the Factory web app. Every session leaves a trail. The problem is that the trail lives in three different places depending on where you ran the agent, and the Factory UI only shows you the last few. If you want to read what Droid did, you need to know where the raw files sit and how to pull them into a reader that treats long AI output like a document instead of a chat bubble. Most teams discover this the first time they need to show a stakeholder what the agent changed.
This post walks through every location Factory stores a Droid session, what the files look like, and how to turn them into clean markdown you can save, search, and share. We cover the three export patterns that work right now: web UI copy, CLI dump, and the raw JSON on disk. By the end you should have a repeatable workflow for pulling any Droid run off its default location and into a reader built for long-form AI output. The commands here were tested against Factory CLI 0.9 and 1.0 on both macOS and Ubuntu.
Where Factory Droid Stores Session History
Factory runs Droid in two modes. The web app runs sessions on Factory's cloud and keeps a transcript in your account dashboard at factory.ai. The CLI runs locally and writes a session file to your home directory. Both share the same session schema, which is good news if you want a single reader for everything. Knowing which mode produced a session matters because retention and sync behave differently in each.
On macOS and Linux, the CLI session files live at ~/.factory/sessions/. Each session is a single JSON file named with a timestamp and a short hash. On Windows, the path is %USERPROFILE%\.factory\sessions\. The file holds the full message array, tool calls, file edits, and shell commands, in order. Nothing is truncated the way the web UI truncates long runs, so this is the richest source you have. The exact paths Droid writes to on each platform:
~/.factory/sessions/on macOS and Linux for global CLI runs%USERPROFILE%\.factory\sessions\on Windows for global CLI runs.factory/sessions/inside a repo if the CLI detects a workspace override- Factory web dashboard at factory.ai for cloud sessions, mirrored to your account
If you run Droid inside a repo with a .factory/ folder, you may also see a local sessions/ subfolder inside that. This is a per-repo override. It takes precedence over the home-directory path when the CLI detects a workspace. Check both if a session seems missing. The precedence order is documented inside the CLI help output under factory config paths and is worth bookmarking. Teams working across several repos usually standardize on one of the two paths so grep stays sane.
Reading a Droid Session Without the Factory UI
The Factory UI is fine for live sessions. It is not built for reading. Long sessions scroll past the viewport, code blocks collapse, and search inside a session is shallow. For anything over 20 messages, pull the raw file out and read it somewhere that respects long-form text. Reviewing a Droid session in the web UI the morning after a long run is the fastest way to lose the context you needed.
The fastest path is to open the JSON file, extract the messages array, and render it as markdown. Each message has a role, a content field, and an optional tool_calls array. Code blocks are already triple-backtick fenced inside the content strings, so you keep syntax highlighting for free. For a reader that handles AI output well, our best markdown reader for AI content walk-through covers what to look for. The same reader also handles the KaTeX blocks Droid emits when it explains algorithms.
If you want the full session as a single markdown file, Factory's CLI has a lightly documented factory session export <id> command that dumps the whole run to stdout as markdown. Pipe it to a .md file and you have a readable artifact. We have seen this work on CLI versions 0.9 and up. The export preserves tool call boundaries as fenced blocks, which keeps diff output legible when you scroll back later. Running it on a session with heavy file edits produces something close to a change log.
Three Export Patterns That Work in Practice
The web UI route is slow but reliable. Open the session in your Factory dashboard, click the overflow menu on any message, pick "copy as markdown". It gives you one message at a time. Fine for a snippet, painful for a full session. Use it when you need a single answer, not a transcript. For a 200-message run this route will burn 30 minutes you did not need to spend.
The CLI route is the one to automate. A short shell loop over ~/.factory/sessions/ plus factory session export gives you a folder of markdown files you can grep, index, or sync to a reader. This is what we use for weekly review of long agent runs. Pair it with a script to extract code blocks if you only care about the code Droid wrote. The loop fits in five lines of bash and runs in under a second per session.
The raw JSON route is the power-user option. If you want to filter sessions by tool call type, cost, or file edited, parse the JSON directly. Each entry includes a metadata block with model, token count, and duration. This is also how you preserve tool outputs that the markdown export flattens into prose. For teams building their own session analytics, the JSON is the only format that keeps full fidelity.
What to Do With the Transcripts Once You Have Them
Pulling the files is step one. Reading them is step two, and most people skip it. A full Droid session on a non-trivial feature can hit 15,000 words of mixed prose, diff, and shell output. That is a document, not a chat. Open it in a reader built for AI output. Prism MD renders the JSON-converted markdown with proper monospace code, collapsible sections, and offline sync so a long session on your phone is readable on the train. What to do once you have a stack of exported sessions:
- Tag each export by project and date so grep across the folder stays useful
- Keep a two-line summary at the top of each file for future-you scanning the list
- Archive anything older than 30 days to a separate folder so active search stays fast
- Export the raw JSON alongside the markdown for sessions you may want to re-analyze
For sessions you want to keep, treat them like meeting notes. Tag by project, archive after 30 days, and keep a short summary at the top. The personal knowledge base from AI conversations post has a tagging schema that works well for agent transcripts specifically. Running this review weekly beats trying to reconstruct what Droid did six weeks later from memory alone. A folder of tagged exports also makes onboarding a new teammate on a long-running agent project a lot less painful.
The one trap to avoid: do not rely on the Factory dashboard as your long-term archive. Factory has rotated session retention twice in the last year, and sessions older than 90 days sometimes disappear from the UI even though the account still shows them in the sidebar. If a session matters, export it the day you run it. The Factory docs are the source of truth for current retention windows, and we recommend checking them before any major refactor you want a durable record of.
FAQ
Where does Factory Droid save chat history by default?
On macOS and Linux, sessions live in ~/.factory/sessions/ as individual JSON files. On Windows, they live in %USERPROFILE%\.factory\sessions\. Web app sessions live in your Factory account and sync to the same schema. A per-repo override at .factory/sessions/ takes precedence when present.
Can I export a Droid session to markdown?
Yes. Use factory session export <id> in the CLI to dump a session as markdown. The web UI only supports per-message copy, not full-session export. The CLI output preserves code blocks and tool call boundaries, which the web UI copy does not always do.
Do Droid sessions sync between devices?
Web sessions sync through your Factory account. CLI sessions are local only, unless you check them into a repo or sync the ~/.factory/sessions/ folder via Dropbox or iCloud yourself. Teams usually solve this by committing an export folder to a private repo rather than syncing the raw directory. Dropbox works too but can create merge conflicts on the JSON files when two machines write at once.
How long does Factory keep session history? Factory's current policy is 90 days for free accounts and longer for paid tiers, but we have seen retention windows change twice in 2026. Export anything important the day you run it. The retention window is listed in your account settings under the data section. Treat the dashboard as a cache, not a vault.
Read Your Droid Sessions Like Documents, Not Chat Bubbles
Factory Droid is a strong coding agent. Its UI is built for live use, not for reading long runs the next day. Pull the JSON, convert to markdown, and open it in a reader that treats a 15,000-word agent run as the document it is. The export routine takes five minutes to set up and pays off every time someone asks what the agent changed last week.
Read every Droid session like a document, not a chat.
Free to start — no credit card.
Related reading
Ready to read your own AI documents?
Open ChatGPT, Claude, Gemini, or any markdown file in the reader built for the way models write.
- ✓Renders code, math & Mermaid out of the box
- ✓Works offline once you've opened a doc
- ✓Free forever for personal reading


