Credentials. Exported chats can contain API keys or secrets in code_context or tool_use fields, so scan the output before you share or store it elsewhere.
Who it is forA developer who has years of conversations in AI coding tools and fears an app update or cleanup will clear the local database.
The problemChat history is stored in each tool's own local format, so it is hard to keep a single copy of it.
The outcomeOne folder of timestamped JSONL files per source, plus an optional combined all_conversations.jsonl file.
What you need first
- Python 3.9 or newer installed on the machine that holds the chat history
- The AI coding tools installed under your own user account, with local chat history present
- Permission to read and store your own local data, and a secure place to keep the output
- For the fine-tuning case: the Hugging Face datasets library and a tokenizer for your target model
Steps
- Run
python extract.py --listto see which supported tools were found on this machine. - Run
python extract.py --all --mergeto extract every found source and write all_conversations.jsonl. - Check the new files in
extracted_data/, one per source, with timestamps in the file names. - Copy the extracted_data folder to encrypted storage, since it may hold client or proprietary work.
Prompt for your agent
Using the repo jatechan/ai-data-extractor, run `python extract.py --all --merge` in the <project folder> directory. Report the number of conversation lines written to each file in extracted_data/ and confirm that all_conversations.jsonl exists. Verify that each JSONL line parses as valid JSON with a messages array.
Caveat. The extractor reads each tool's storage as it exists today, and Windsurf and Trae use a heuristic that may return zero conversations after a storage change.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for jatechan/ai-data-extractor and "Back up AI coding chat history before it is lost"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer