I had a long Google AI Studio (Gemini) session that I wanted to keep. I selected the conversation in the browser, copied it, and pasted it into a text file.
File size: a few hundred KB. "OK, that's safe."
Later, I exported the same session as JSON. File size: a few MB.
More than half of the data had silently disappeared.
What was missing
I checked what the manual copy had dropped.
The system prompt
The instruction I had originally given the model — the system prompt — was completely gone. Manual copy captures only the user/assistant turns visible in the conversation pane. The instruction context that shaped the entire session does not get copied.
The tail of long responses
When a Gemini response is long, the browser shows a "Show more" button. If you copy without expanding it, the response gets cut mid-sentence. I ran into this more than once across the sessions I'd copied by hand.
Newlines inside code blocks
Newlines inside code blocks got mangled in several places. Responses containing JSON or YAML had indentation that no longer parsed.
The reasoning trace
For some models, the model's reasoning trace is stored separately from the visible response. Manual copy doesn't capture it at all.
How to export as JSON
Google AI Studio has a session export feature.
- In the session view, click the
...menu at the top right - Select "Export"
- Choose JSON format and download
The JSON contains the full data, including the system prompt.
What I found when I checked
I went back through the sessions I'd manually copied and set them next to a full export of the same conversation. The pattern held: the manually-copied file was dramatically smaller than what the export actually contained — in the case I could verify precisely, the hand-copied text came in at under 70KB while the JSON-derived transcript of the same conversation ran past 500KB. That's not a rounding error; it's the difference between "mostly complete" and "mostly gone."
Why I didn't notice
If you open the manually-copied file, the conversation reads fine. As long as the start and end connect, a missing middle is hard to detect by eye.
The system prompt especially — it doesn't appear in the visible conversation. There is no marker for "the instruction is gone." The file just looks like a clean transcript.
What to do with the exported JSON
Across the sessions I'd exported this way, the combined JSON came to well over 200,000 lines. Hard to work with as single files, so I split each one into smaller chunks.
Split into chunks
Claude Code's Read tool has a per-call line limit. Reading tens of thousands of lines from a single file at once isn't viable, so across the archive I ended up with 200+ smaller files, grouped by session/topic rather than dumped into one flat folder.
<session-topic>/
├── part-01.md
├── part-02.md
...
└── part-NN.md
Make it searchable with INDEX.md
Each session got a summary line in INDEX.md.
## Session list
| ID | Theme | Key content | Lines |
|-----|------------------|------------------------------------|-------|
| 001 | World design | Magic system, geography setup | 1,234 |
| 002 | Character | Protagonist personality | 987 |
grep and filename search now find the right session.
Lessons
Don't trust manual copy from a browser
Manual copy copies "what's visible." Anything not visible — the system prompt, the collapsed tail of a response, the reasoning trace — does not come along.
If the service has an export, use the export
Service-provided export is designed to output the complete data. Always more reliable than manual.
Back up regularly
The longer the session gets, the more you lose if you wait. I now try to export important sessions to JSON regularly instead of relying on manual copy.
I thought "manual copy is enough." Most of the data was gone. If you want to keep your AI conversation logs, use the official export feature.
Originally published in Japanese at Qiita. Same author writing under "nomuraya / shimajima / nomurasan / 中翔" across media. English version adapted rather than literally translated.
Top comments (0)