unity-session-resume

unity-session-resume is a command for Claude Code from XeldarAlz/everything-claude-unity. It costs 28 tokens per session (457 once invoked), scanned A, original, MIT.

A command that restores a named coding-session snapshot into the live session state. The next session start can then use that saved information.

In plain words
What is it for?
Use it to resume a snapshot by label, inspect fuzzy matches when the label is unclear, and review the saved branch, plan, workflow phase, modified-file count, and timestamp.
Why use it?
It lets you return to an earlier saved context instead of reconstructing the task from memory. It also warns when restoring could overwrite recent live work.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the everything-claude-unity plugin — 42 skills, 27 commands, 20 agents, 5 hooks 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/xeldaralz/everything-claude-unity/unity-session-resume
Clone the repo
git clone --depth 1 https://github.com/XeldarAlz/everything-claude-unity

Made for: Claude Code.

Or install everything-claude-unity, the plugin that ships this one along with the rest of its 42 skills, 27 commands, 20 agents, 5 hooks.

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 unity-session-resume

README.md
[![agentmods](https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-session-resume.svg)](https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-session-resume)
Your own site
<a href="https://agentmods.dev/commands/xeldaralz/everything-claude-unity/unity-session-resume"><img src="https://agentmods.dev/badge/commands/xeldaralz/everything-claude-unity/unity-session-resume.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00028 $0.00457
Opus 5 $0.00014 $0.00229
Sonnet 5 $0.00006 $0.00091
Haiku 4.5 $0.00003 $0.00046

Measured 6d ago against content hash fdb626d4c5d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

unity-session-resume 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 6d 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.

.claude/commands/unity-session-resume.md · 44 lines

What it actually says

/unity-session-resume — Resume a Saved Session

Restore a snapshot created with /unity-session-save so the next session restore reads this state: $ARGUMENTS

Steps

  1. Parse label from $ARGUMENTS. If missing, run /unity-sessions and tell the user to pick one.
  2. Confirm .claude/state/sessions/<label>.json exists. If not:
    • Look for fuzzy matches (prefix, substring).
    • If multiple matches, show them and stop.
    • If one match, confirm before using it.
  3. Warn the user if the current .claude/state/session.json has saved_at within the last 30 minutes AND has modified files — they may be about to overwrite live work. Offer to auto-save the current state first via /unity-session-save current-<timestamp>.
  4. Copy sessions/<label>.json over session.json.
  5. Report what was restored:
Session **<label>** restored.

**Branch (snapshot):** <branch>
**Current branch:** <current>
**Workflow phase:** <workflow_phase>
**Plan:** <plan.description>
**Modified files at save:** <count>
**Saved:** <ISO timestamp>

⚠ Branch mismatch — run `git checkout <branch>` before resuming edits.
  1. Remind the user that in-memory conversation context is not restored — only the state file. A new conversation must be started for the SessionStart hook to fire and inject the restored context.

Rules

  • Branch mismatch warning — if .branch in snapshot != current branch, highlight it and suggest checkout.
  • TTL respect — if snapshot is older than UNITY_SESSION_TTL_HOURS (default 4), warn but allow.
  • Atomic — write to session.json.tmp then mv so a crash doesn't leave a half-written file.
  • Never prompt for silent overwrite — always show what's being replaced.
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. 6d ago First seen · 44 lines · 28 tokens per session scan A fdb626d4c5d6

Subscribe to this mod's changes

unity-session-resume is a command published in the GitHub repository XeldarAlz/everything-claude-unity (21 stars, last pushed 4mo ago), licensed MIT. It adds 28 tokens to every session and 457 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.