[GH-ISSUE #23] Bug: Antigravity sessions not detected - file extension mismatch (.json vs .jsonl) #10

Closed
opened 2026-03-04 01:39:12 +03:00 by kerem · 3 comments
Owner

Originally created by @DaveW001 on GitHub (Mar 1, 2026).
Original GitHub issue: https://github.com/yigitkonur/cli-continues/issues/23

Bug Description

The continues tool fails to detect Antigravity sessions because it looks for *.jsonl files, but Antigravity stores sessions as *.json files.

Environment

  • OS: Windows 11
  • Node.js: v22.x
  • continues: Latest (npm)
  • Antigravity: Installed (has active sessions)

Steps to Reproduce

  1. Install and use Antigravity (create some sessions)
  2. Run continues scan
  3. Observe that Antigravity shows 0 sessions

Expected Behavior

Antigravity sessions should appear in the scan results:

Total sessions: X
opencode: Y
 gemini: Z
antigravity: 9  <-- Should show sessions

Actual Behavior

Antigravity shows 0 sessions:

Total sessions: 1256
opencode: 1189
 gemini:   61
 codex:     6

(No antigravity line shown)

Root Cause Analysis

In the Antigravity parser (src/parsers/antigravity.ts):

async function findSessionFiles() {
    if (!fs.existsSync(ANTIGRAVITY_BASE_DIR))
        return [];
    const results = [];
    for (const projectDir of listSubdirectories(ANTIGRAVITY_BASE_DIR)) {
        results.push(...findFiles(projectDir, {
            match: (entry) => entry.name.endsWith('.jsonl'),  // <-- WRONG EXTENSION
            recursive: false,
        }));
    }
    return results;
}

The code looks for .jsonl files, but Antigravity stores sessions as .json files.

Actual Antigravity file structure:

~/.gemini/antigravity/code_tracker/
└── active/
    └── marketing_c6b0a246fed027ea5320d32599b49dd21269a47e/
        ├── 55d56fa3cebff90d4770e8c5669f1c91_prioritization-problem.json  <-- .json
        ├── 800f52a1ba34f9b5a07c1e32829d8b24_pmo-transformation.json      <-- .json
        └── ... (8 total .json files)

File format: The .json files contain JSON data with a binary/protobuf prefix (which the parser already handles with stripBinaryPrefix).

Evidence

Antigravity sessions exist:

$ find ~/.gemini/antigravity/code_tracker/ -name "*.json" -type f | wc -l
9

$ ls ~/.gemini/antigravity/code_tracker/active/
2025-pa-website_c2fd73bed6bf9e2c95a07c35b74c921f4ea085c3/
clickup-contact-entry_7b819524e666fcc99fc9a27fb9526e249b599b87/
daily-priority-briefing_f62e643c65cc27a465633afd5d419304c243bcb7/
knowledge-base_6af0708afbfc70df5123489092000beefb5f43dd/
marketing_413a48493adbaa5c52c01bd46fa5e827f79259fb/
marketing_c6b0a246fed027ea5320d32599b49dd21269a47e/
playground/

But continues doesn't see them:

$ continues scan | grep -i antigravity
(No output)

Fix Required

Change the file extension filter in src/parsers/antigravity.ts:

Current (broken):

match: (entry) => entry.name.endsWith('.jsonl'),

Fixed:

match: (entry) => entry.name.endsWith('.json'),

Or better yet, support both:

match: (entry) => entry.name.endsWith('.json') || entry.name.endsWith('.jsonl'),

Additional Context

Looking at the code, the parser already handles the binary prefix in JSON files via stripBinaryPrefix(), so it seems the code was designed to handle these files but the file extension filter was set incorrectly to .jsonl instead of .json.

The stripBinaryPrefix function:

function stripBinaryPrefix(line) {
    const idx = line.indexOf('{');
    if (idx === -1) return null;
    return line.slice(idx);
}

This confirms the parser expects JSON content after a binary prefix, which matches the actual .json file format.

Labels

bug, antigravity, parser

Originally created by @DaveW001 on GitHub (Mar 1, 2026). Original GitHub issue: https://github.com/yigitkonur/cli-continues/issues/23 ## Bug Description The continues tool fails to detect Antigravity sessions because it looks for `*.jsonl` files, but Antigravity stores sessions as `*.json` files. ## Environment - **OS:** Windows 11 - **Node.js:** v22.x - **continues:** Latest (npm) - **Antigravity:** Installed (has active sessions) ## Steps to Reproduce 1. Install and use Antigravity (create some sessions) 2. Run `continues scan` 3. Observe that Antigravity shows 0 sessions ## Expected Behavior Antigravity sessions should appear in the scan results: ``` Total sessions: X opencode: Y gemini: Z antigravity: 9 <-- Should show sessions ``` ## Actual Behavior Antigravity shows 0 sessions: ``` Total sessions: 1256 opencode: 1189 gemini: 61 codex: 6 ``` (No antigravity line shown) ## Root Cause Analysis **In the Antigravity parser (`src/parsers/antigravity.ts`):** ```javascript async function findSessionFiles() { if (!fs.existsSync(ANTIGRAVITY_BASE_DIR)) return []; const results = []; for (const projectDir of listSubdirectories(ANTIGRAVITY_BASE_DIR)) { results.push(...findFiles(projectDir, { match: (entry) => entry.name.endsWith('.jsonl'), // <-- WRONG EXTENSION recursive: false, })); } return results; } ``` The code looks for `.jsonl` files, but Antigravity stores sessions as `.json` files. **Actual Antigravity file structure:** ``` ~/.gemini/antigravity/code_tracker/ └── active/ └── marketing_c6b0a246fed027ea5320d32599b49dd21269a47e/ ├── 55d56fa3cebff90d4770e8c5669f1c91_prioritization-problem.json <-- .json ├── 800f52a1ba34f9b5a07c1e32829d8b24_pmo-transformation.json <-- .json └── ... (8 total .json files) ``` **File format:** The `.json` files contain JSON data with a binary/protobuf prefix (which the parser already handles with `stripBinaryPrefix`). ## Evidence **Antigravity sessions exist:** ```bash $ find ~/.gemini/antigravity/code_tracker/ -name "*.json" -type f | wc -l 9 $ ls ~/.gemini/antigravity/code_tracker/active/ 2025-pa-website_c2fd73bed6bf9e2c95a07c35b74c921f4ea085c3/ clickup-contact-entry_7b819524e666fcc99fc9a27fb9526e249b599b87/ daily-priority-briefing_f62e643c65cc27a465633afd5d419304c243bcb7/ knowledge-base_6af0708afbfc70df5123489092000beefb5f43dd/ marketing_413a48493adbaa5c52c01bd46fa5e827f79259fb/ marketing_c6b0a246fed027ea5320d32599b49dd21269a47e/ playground/ ``` **But continues doesn't see them:** ```bash $ continues scan | grep -i antigravity (No output) ``` ## Fix Required Change the file extension filter in `src/parsers/antigravity.ts`: **Current (broken):** ```javascript match: (entry) => entry.name.endsWith('.jsonl'), ``` **Fixed:** ```javascript match: (entry) => entry.name.endsWith('.json'), ``` Or better yet, support both: ```javascript match: (entry) => entry.name.endsWith('.json') || entry.name.endsWith('.jsonl'), ``` ## Additional Context Looking at the code, the parser already handles the binary prefix in JSON files via `stripBinaryPrefix()`, so it seems the code was designed to handle these files but the file extension filter was set incorrectly to `.jsonl` instead of `.json`. The `stripBinaryPrefix` function: ```javascript function stripBinaryPrefix(line) { const idx = line.indexOf('{'); if (idx === -1) return null; return line.slice(idx); } ``` This confirms the parser expects JSON content after a binary prefix, which matches the actual `.json` file format. ## Labels bug, antigravity, parser
kerem closed this issue 2026-03-04 01:39:13 +03:00
Author
Owner

@yigitkonur commented on GitHub (Mar 2, 2026):

hey @DaveW001 — this should be fixed in #30. beyond the extension mismatch you found, it also fixes recursive directory traversal, async io, and project name parsing. would you mind giving it a try once merged and letting us know if your 9 sessions show up? thanks for the detailed report 🙏

<!-- gh-comment-id:3986812677 --> @yigitkonur commented on GitHub (Mar 2, 2026): hey @DaveW001 — this should be fixed in #30. beyond the extension mismatch you found, it also fixes recursive directory traversal, async io, and project name parsing. would you mind giving it a try once merged and letting us know if your 9 sessions show up? thanks for the detailed report 🙏
Author
Owner

@yigitkonur commented on GitHub (Mar 2, 2026):

merged #30 — @DaveW001 this should be fixed now. grab the latest version and your antigravity sessions should show up. let us know if anything's still off 👍

<!-- gh-comment-id:3986917684 --> @yigitkonur commented on GitHub (Mar 2, 2026): merged #30 — @DaveW001 this should be fixed now. grab the latest version and your antigravity sessions should show up. let us know if anything's still off 👍
Author
Owner

@DaveW001 commented on GitHub (Mar 3, 2026):

Apology: First, I want to apologize for my previous comment which I deleted. I should have done more thorough investigation.


Investigation Summary

Testing with cli-continues v4.0.9 (built from GitHub main):

$ node cli.js scan --all
Total sessions: 1283
opencode: 1215
gemini  :   62
codex   :    6
(antigravity: 0)

$ node cli.js antigravity
No antigravity sessions found.

What I Found

cli-continues parser expects (from src/parsers/antigravity.ts):

  • Location: ~/.gemini/antigravity/code_tracker/**/*.json or .jsonl
  • Format: {type: "user"|"assistant", content, timestamp} entries

My Antigravity installation has:

Directory Contents Format
conversations/ 77 conversation files .pb (encrypted protobuf)
implicit/ 18 context files .pb (encrypted protobuf)
code_tracker/active/ File snapshots .json, .md, .txt

The code_tracker/ directory contains file snapshots (Perplexity results, source code, etc.) rather than conversation logs. The actual conversations are in .pb protobuf files.

<!-- gh-comment-id:3992153597 --> @DaveW001 commented on GitHub (Mar 3, 2026): **Apology:** First, I want to apologize for my previous comment which I deleted. I should have done more thorough investigation. --- ### Investigation Summary Testing with cli-continues v4.0.9 (built from GitHub main): ``` $ node cli.js scan --all Total sessions: 1283 opencode: 1215 gemini : 62 codex : 6 (antigravity: 0) $ node cli.js antigravity No antigravity sessions found. ``` ### What I Found **cli-continues parser expects** (from `src/parsers/antigravity.ts`): - Location: `~/.gemini/antigravity/code_tracker/**/*.json` or `.jsonl` - Format: `{type: "user"|"assistant", content, timestamp}` entries **My Antigravity installation has:** | Directory | Contents | Format | | -------------------- | --------------------- | ------------------------ | | `conversations/` | 77 conversation files | `.pb` (encrypted protobuf) | | `implicit/` | 18 context files | `.pb` (encrypted protobuf) | | `code_tracker/active/` | File snapshots | `.json`, `.md`, `.txt` | The `code_tracker/` directory contains file snapshots (Perplexity results, source code, etc.) rather than conversation logs. The actual conversations are in `.pb` protobuf files.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cli-continues#10
No description provided.