Skip to content

[GEMINI-SYNC] Never Appears in the Log: Gemini CLI

Quick fix

Upgrade to cc-switch v4.0.1; this version fixes Gemini CLI .jsonl session file detection and incremental record parsing.

Error output
[GEMINI-SYNC] **never appears in the log at all** — not even a parse warning:

Older versions checked only for the `.json` extension, while Gemini CLI session files use `.jsonl`, so the files were not scanned. In addition, the parser read the entire file as a single JSON object, but the new format is append-only JSONL containing multiple record types; `$set.messages` represents a full replacement snapshot, while repeated `id` values in standalone records indicate that existing messages are rewritten. Fixing only the extension would still not correctly import sessions or calculate token usage. The maintainer confirmed that v4.0.1 fixes both defects and replays incremental records.

  1. Upgrade to cc-switch v4.0.1 or later; the maintainer confirmed that this version accepts Gemini CLI `session-*.jsonl` files and replays incremental records, including `$set` updates, into complete sessions.

  2. After upgrading, check the session list and usage statistics. If Gemini sessions or usage are still missing in the latest version, resubmit the issue with details, as the maintainer recommended.

ToolGemini CLI
Version3.16.2、3.20.3 受影响;cc-switch v4.0.1 修复
PlatformsmacOS
What should I do if Gemini sessions or usage are still missing after the fix?
The maintainer recommends resubmitting the issue with details if the problem persists in the latest version.
Why do some models still show $0 in costs after the fix?
The issue report says that even after session parsing is fixed, models without a pricing entry in `model-pricing.json` may show token usage without costs; the cost issue was considered worth reporting separately.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.