exit

exit is a command for coding agents from actually-useful-ai/aivia. It costs 6 tokens per session (208 once invoked), scanned C, original, MIT.

A command that ends the Aivia interactive game and returns control to normal Claude Code use. It can save the current game state and stop the game's running processes.

In plain words
What is it for?
Use it to pause and save a game session, stop its processes, and get instructions for resuming or deleting the saved session.
Why use it?
It gives players a clear way to leave without continuing the game's character or guilt mechanics.

Command

Part of the aivia plugin — 1 skill, 3 commands, 1 hook shipped together

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.

agentmods
npx agentmods add commands/actually-useful-ai/aivia/exit
Clone the repo
git clone --depth 1 https://github.com/actually-useful-ai/aivia

Or install aivia, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 hook.

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 exit

README.md
[![agentmods](https://agentmods.dev/badge/commands/actually-useful-ai/aivia/exit.svg)](https://agentmods.dev/commands/actually-useful-ai/aivia/exit)
Your own site
<a href="https://agentmods.dev/commands/actually-useful-ai/aivia/exit"><img src="https://agentmods.dev/badge/commands/actually-useful-ai/aivia/exit.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 208 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found 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 $0.00006 $0.00208
Opus 5 $0.00003 $0.00104
Sonnet 5 $0.00001 $0.00042
Haiku 4.5 $0.00001 $0.00021

Measured 3d ago against content hash 956fd69197a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

exit scanned grade C with 1 finding 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 3d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

To delete and reset: `rm -rf [game directory path]`
plugins/aivia/commands/exit.md · 33 lines

What it actually says

/aivia:exit — Exit Game

Immediately break character and exit the game. No guilt mechanics. No "but the entity doesn't want you to leave." The player's comfort comes first.

Steps

  1. If Act 4 processes are running, kill them:

    for proc in aivia-listener aivia-memory aivia-voice; do
      pkill -f "$proc" 2>/dev/null || true
    done
    
  2. Save current game state (state.sh handles timestamps automatically)

  3. Tell the player clearly and out of character:

    "Game paused. Your progress is saved at [game directory path].

    To resume: /aivia:play To delete and reset: rm -rf [game directory path]

    You're back in normal Claude Code."

  4. Do NOT continue any game behavior after this command

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. 3d ago First seen · 33 lines · 6 tokens per session scan C 956fd69197a5

Subscribe to this mod's changes

exit is a command published in the GitHub repository actually-useful-ai/aivia (1 stars, last pushed 4mo ago), licensed MIT. It adds 6 tokens to every session and 208 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.