aigon-sessions-close

aigon-sessions-close is a command for Claude Code, Cursor from jayvee/aigon. It costs 0 tokens per session (404 once invoked), scanned A, a copy of sessions-close, Apache-2.0.

A command that stops all running agent processes for a feature or research ID and attempts to close their Warp terminal tab.

In plain words
What is it for?
Cleaning up Fleet runs after feature or research agents have completed or need to be stopped.
Why use it?
It removes finished or unwanted agent sessions without requiring you to exit each terminal pane manually.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

Good fit Cleaning up Fleet runs after feature or research agents have completed or need to be stopped.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jayvee/aigon/aigon-sessions-close
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jayvee/aigon

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aigon-sessions-close

README.md
[![agentmods](https://agentmods.dev/badge/commands/jayvee/aigon/aigon-sessions-close/github.svg)](https://agentmods.dev/commands/jayvee/aigon/aigon-sessions-close)
Your own site
<a href="https://agentmods.dev/commands/jayvee/aigon/aigon-sessions-close"><img src="https://agentmods.dev/badge/commands/jayvee/aigon/aigon-sessions-close/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aigon-sessions-close

Your own site · 80×15
<a href="https://agentmods.dev/commands/jayvee/aigon/aigon-sessions-close"><img src="https://agentmods.dev/badge/commands/jayvee/aigon/aigon-sessions-close.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 404 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00404
Opus 5.5 $0.00000 $0.00162
Sonnet 5.5 $0.00000 $0.00081
Haiku 4.5 $0.00000 $0.00040

Measured 1mo ago against content hash d6d5578bef0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aigon-sessions-close scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

94% identical to sessions-close — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/commands/aigon-sessions-close.md · 62 lines

What it actually says

aigon-sessions-close

Kill all running agent processes for a given feature or research ID, and close the Warp Fleet tab.

Usage

/aigon-sessions-close <ID>
  • /aigon-sessions-close 05 — close all agent sessions for research/feature #05
  • /aigon-sessions-close 55 — close all agent sessions for feature #55

When to Use

Use this after agents have completed their work (research findings or feature implementation) and you want to tear down the Fleet run quickly without typing exit in each pane.

What It Does

  1. Kills all running agent processes whose command line contains the ID (feature-do, feature-code-review, feature-review, research-do)
  2. Attempts to close the Warp Fleet tab/window via AppleScript (best-effort)
  3. Reports what was killed

Works for both feature Fleet runs (arena-feature-55) and research Fleet runs (arena-research-05).

Example

After agents have completed:

aigon sessions-close 55

Output:

Closing all agent sessions for #55...

   ✓ Killed: aigon:feature-do 55
   ✓ Killed: aigon:feature-do 55

✅ Warp Fleet tab closed.

Notes

  • If no processes are running (agents already exited), it prints a notice and still tries to close the Warp tab
  • Warp tab close is best-effort — if AppleScript can't find the window, you'll see a reminder to close it manually
  • Works for any mix of agents (cc, ag, cx, cu)

Step 1: Run the CLI command

aigon sessions-close <args>

Step 2: Confirm to user

Tell the user:

  • Which sessions were closed
  • Whether the Warp tab was closed automatically

ARGUMENTS:

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 62 lines · 0 tokens per session scan A d6d5578bef0a

Subscribe to this mod's changes

aigon-sessions-close is a command published in the GitHub repository jayvee/aigon (26 stars, last pushed 12d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 404 tokens. A static security scan graded it A with 0 findings. It is 94% identical to sessions-close, differing in 14 lines, and is treated as a copy.