gemini-compact
Reviewed
at commit 0e4c0dd
New version, not yet reviewed
Sends data to Google Gemini (generativelanguage.googleapis.com)
Moves compaction from Claude to Gemini: in summary mode Gemini summarizes the conversation and the newest messages stay verbatim, in prune mode every message…
0 upvotes
Log in to upvote or save- Made by
- Kerem Gok
- Pinned commit
-
0e4c0dd09165cae2933d79eda6069c6df477137f - What we checked
-
Off until you run /gemini-compact on. Then compaction (manual or automatic at 60% context) sends the conversation, including tool outputs, to Google Gemini with your own key, which writes the summary, or decides which old tool calls to keep, cut or drop. If Gemini fails, Claude's built-in summary runs instead.
Review details
Static review of the source at the pinned commit; not run. Registers session.start, command.run (/gemini-compact on|off|mode summary|prune|at N|at off|reset|status), session.compact and turn.complete. Defaults to disabled. In session.compact (main agent only) it sends the transcript (summary mode: everything before the newest 6 messages, up to 2,000,000 chars; prune mode: up to 400,000 chars) through $.http.fetch to Gemini via the request built by gemini-core (generativelanguage.googleapis.com, key in a header), then returns the rewritten messages: a Gemini-written summary plus the newest messages verbatim, or the same messages with some tool calls truncated or removed and a note naming removed calls. Falls back to the built-in summary on missing key, error, too short or not smaller. After a finished turn, if context use exceeds the threshold it starts $.session.compact() once until usage falls below the threshold again. Stores enabled, mode and threshold with $.store; toast and log report results, with a free-tier warning. Reads no files, runs no programs. The content Gemini returns replaces the conversation history, so a poor summary can lose detail; that is the stated purpose. gemini-core was reviewed separately.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: yes
- Shows something on screen: yes
- Hooked events
Moves compaction from Claude to Gemini: in summary mode Gemini summarizes the conversation and the newest messages stay verbatim, in prune mode every message stays and Gemini keeps, cuts or drops older tool calls. Off until /gemini-compact on; gemini-core holds the key, tier, model and thinking level.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/gemini-compact/)