Local History Guide / Antigravity CLI
Antigravity CLI Local History: Where Antigravity Stores Sessions on macOS
Antigravity keeps local history in two unrelated shapes, under a directory that does not have "antigravity" first in its path. The CLI writes a step-by-step JSONL transcript. The editor writes Markdown artifacts (task lists, plans, walkthroughs), one folder per conversation. Both live under ~/.gemini. This guide covers the exact paths, the record shape, and the one file most people miss when their transcript looks cut off.
Agent Sessions reads Antigravity's local files in read-only mode. It does not upload transcripts and does not write into Antigravity's state.
Where Antigravity Stores Local Data
Antigravity's command line is agy, and its history lives under Gemini's config directory rather than one named after the product. The CLI transcript is nested three levels inside the conversation folder:
~/.gemini/antigravity-cli/brain/<conversation-id>/.system_generated/logs/transcript.jsonl
The editor keeps a separate store, one folder per conversation, holding Markdown artifacts instead of a transcript:
~/.gemini/antigravity/brain/<conversation-id>/*.md
The files you find there are named for what they are: task.md, implementation_plan.md, walkthrough.md, proposal.md, each with .metadata.json and .resolved siblings, plus any screenshots the agent captured. There is no message log in that folder. The artifacts are the record.
The conversation ID is a UUID, it is the folder name in both stores, and it is what agy --conversation takes.
An install that has been upgraded can also grow sibling directories: ~/.gemini/antigravity-ide/brain and ~/.gemini/antigravity-backup/brain. On a machine we checked, all three held the same four conversation IDs with the same artifacts. If you are grepping by hand, expect duplicate hits. Agent Sessions scans antigravity/brain and antigravity-cli/brain only, so the same conversation does not turn up three times in the list.
What an Antigravity Record Looks Like
Each line of transcript.jsonl is one step, not one message:
{ "step_index": ..., "source": ..., "type": ..., "status": ...,
"created_at": ..., "content": ..., "tool_calls": [...],
"thinking": ..., "truncated_fields": [...] }
step_index is the ordering key and is present on every record, which is the cheapest way to tell an Antigravity transcript from any other JSONL on disk. source is USER_EXPLICIT, MODEL, or SYSTEM. status is DONE, or RUNNING for a step still in flight.
The type values worth knowing:
USER_INPUT: your prompt, wrapped in<USER_REQUEST>…</USER_REQUEST>, often followed by<ADDITIONAL_METADATA>or<USER_SETTINGS_CHANGE>blocks. Strip the tags or you will be reading envelope, not prompt.PLANNER_RESPONSE: the model's turn.contentis the answer,thinkingis internal reasoning, andtool_calls[]carries each call'snameandargs. A record can have any combination of the three.RUN_COMMAND,VIEW_FILE,LIST_DIRECTORY,GREP_SEARCH,SEARCH_WEB,CODE_ACTION: the results, one record per tool run, with the output incontent.CONVERSATION_HISTORY,CHECKPOINT,SYSTEM_MESSAGE,GENERIC: bookkeeping.
Two things are missing from the record that you might expect. There is no version stamp: Antigravity does not write its own version into the transcript, so dating a session means falling back on created_at. And there is no working directory. The model name is recoverable only indirectly, from the USER_SETTINGS_CHANGE line that reports a change to Model Selection.
The Truncation, and the File That Fixes It
This is the part worth reading twice. Antigravity clips long tool output before writing transcript.jsonl and names the clipped field in truncated_fields. A clipped record ends with something like (...93 more results not shown). Nothing else marks it.
The untruncated text is in a sibling file:
~/.gemini/antigravity-cli/brain/<conversation-id>/.system_generated/logs/transcript_full.jsonl
In one real session on disk, both files carry the same 81 records in the same order, but transcript_full.jsonl has no truncated_fields key at all and holds the complete content: 8,896 characters on a GREP_SEARCH record where transcript.jsonl stops at 4,120. Twelve of the 81 records were clipped. If you are hunting for output that is definitely not in the transcript, look there before concluding it was never recorded.
List the clipped steps first, then go read the full versions:
jq -r 'select(.truncated_fields) | "\(.step_index)\t\(.type)"' \
~/.gemini/antigravity-cli/brain/<conversation-id>/.system_generated/logs/transcript.jsonl
Reading It Yourself
Every prompt across every CLI conversation:
jq -r 'select(.type=="USER_INPUT") | .content' \
~/.gemini/antigravity-cli/brain/*/.system_generated/logs/transcript.jsonl
Which tools the agent reaches for, ranked:
jq -r 'select(.tool_calls) | .tool_calls[].name' \
~/.gemini/antigravity-cli/brain/*/.system_generated/logs/transcript.jsonl \
| sort | uniq -c | sort -rn
The editor side is plain Markdown, so ordinary tools work on it:
grep -ril "the-thing-you-remember" ~/.gemini/antigravity/brain/*/*.md
Where Hand-Reading Runs Out
- Prompts arrive wrapped.
USER_INPUT.contentmixes your text with metadata blocks in the same string, so a naive dump of the field returns markup around the sentence you wanted. - Tool results are one step behind their call. The call is in a
PLANNER_RESPONSE'stool_calls[]; the output is a later record of a different type. Nothing in the result names the tool that produced it. The link is the position in the sequence. - Truncation is silent unless you check. If you read
transcript.jsonland never look attruncated_fields, a clipped transcript reads as a complete one. - The two stores do not join. A CLI transcript and an editor conversation share the same folder-name scheme but sit in different roots with different formats, so "everything I did on this task" is two searches, not one.
- No working directory. Neither store records the project. On the Markdown side you can sometimes recover it from file paths mentioned inside an artifact; on the CLI side there is nothing to recover it from.
What Agent Sessions Does
- Lists Antigravity CLI transcripts and editor Markdown artifacts beside Codex, Claude Code, Copilot, Cursor, OpenCode, Hermes, OpenClaw, and the other supported agents.
- Unwraps
<USER_REQUEST>so prompts read as prompts, and titles each session from its first prompt line. - Renders
PLANNER_RESPONSEanswers, reasoning, and tool calls as a timeline, withRUN_COMMAND,VIEW_FILE,LIST_DIRECTORY,CODE_ACTION, andSEARCH_WEBshown as tool results rather than raw records. - Marks clipped text explicitly: a record whose
truncated_fieldsnamescontentis labelled as truncated instead of shown as if it were whole. - Recovers the model name from the
Model Selectionsettings-change line when a session has one. - Titles Markdown artifacts from their first heading and infers a project by walking up from local paths mentioned in the file to the nearest git root.
- Pulls screenshots referenced by Markdown image links into the Image Browser, resolved relative to the artifact's own folder.
- Refuses JSONL that lacks
step_index, so foreign transcripts under the same roots are not mis-claimed as Antigravity sessions. - Builds resume commands (
agy --conversation <conversation-id>, oragy --continuefor the most recent) and can launch them in Terminal.app, iTerm2, or Warp.
Antigravity session-format support has been verified through Antigravity 1.1.14, and the format is re-checked weekly against fresh sessions.
What This Does Not Do
- Read
transcript_full.jsonl. Agent Sessions indexestranscript.jsonland flags what the CLI clipped; the untruncated text stays where Antigravity put it. - Render
GREP_SEARCHresults as tool output. They currently show as metadata records, and they are searchable, but they do not get the tool-result treatment the other five types do. - Reconstruct a conversation's working directory when nothing in the files names one.
- Merge a CLI transcript and an editor conversation that share an ID into a single session.
- Write into Antigravity's state, or upload transcripts to a hosted search service.
Related Guides
- GitHub Copilot CLI local history
- Codex local history
- Claude Code JSONL history
- Cursor Agent local history