# Agy Session Resume

> Per-thread model memory and session resume guard for Google Antigravity CLI on Windows. Prevents cross-window model mix-ups and preserves Prompt Cache hits to save credits.

Agy Session Resume is a free AI agent skill on Agensi by Myhoolabs, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Myhoolabs](https://www.agensi.io/creators/myhoolabs)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-26
- Security: scan passed (2026-11-26); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/agy-session-resume
- Tags: llm-ops, antigravity-cli, python, powershell, windows, caching

## About this skill

Agy Session Resume is a zero-dependency, single-file Python standard-library tool (`agy_session_guard.py`) that fixes a major limitation in native Google Antigravity CLI (`agy`) on Windows.

Why it matters (Cache Hits & Credit Savings):
Native `agy` stores the active model in global `settings.json` instead of binding it per conversation. When you switch models in one terminal window and later resume an older thread (`agy -r`, `agy -c`, or `agy --conversation <id>`), native `agy` resumes with the wrong global model—breaking server-side Prompt Cache hits and wasting latency and credits.

What Agy Session Resume does:
- Read-Only Per-Thread Model Recovery: Inspects local session databases (`executor_metadata` / `gen_metadata`) in read-only mode to recover each thread's exact last-used model and thinking level (including Orchestrator Planner + Executor pairs).
- Zero Global Pollution: Passes the recovered model via process-level `--settings` flags without ever overwriting global `settings.json`, preserving Prompt Cache continuity.
- Minimal Two-Column Picker (`agy -r [keyword]`): Zero-flicker interactive session list showing Thread Title and exact Model/Thinking Level with live keyword filtering.
- Safe Passthrough & Flag Merging: Respects explicit `--model` or `--settings` overrides and passes non-resume commands directly to `agy.exe`.

Includes `install.ps1` for idempotent Windows setup and `tests/test_agy_session_guard.py`.

Created by Myhoolabs on GitHub (Repo: Myhoolabs/agy-session-resume).

## Requires

- Python
- Git

## Known limitations

Windows only; designed specifically for Google Antigravity CLI (agy) local session databases.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Agy Session Resume skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does Agy Session Resume improve my workflow compared to the standard CLI?

This skill prevents the Antigravity CLI from using the wrong model when you resume a conversation, which is a common issue when running multiple terminals on Windows. It ensures that every thread automatically uses its original model settings, protecting your Gemini Prompt Cache and reducing token costs.

### Does this support the Antigravity Orchestrator mode with multiple model pairs?

Yes, it is specifically designed to handle complex sessions involving both Planner and Executor models, including their individual 'thinking' levels. The skill ensures that both agents in the orchestrator pair are restored to their correct configurations simultaneously.

### What are the system requirements for running this skill?

The skill requires Windows 10/11, Python 3.10+, and an existing installation of the Google Antigravity CLI. It currently operates within PowerShell environments through a profile-based wrapper.

### What exactly is included in the purchase?

You will receive the core Python automation scripts, the PowerShell integration profile, and a setup guide to link the skill to your existing CLI installation. All future updates to ensure compatibility with new Antigravity CLI versions are included.

### Will using this skill overwrite my global Antigravity settings?

No, it functions via read-only access to your local SQLite session databases and uses process-level CLI flags. It never modifies your global settings.json, keeping your base configuration clean and safe from corruption.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
