unwrap

unwrap is a command for coding agents from VaibhavAher100/wrap-session. It costs 0 tokens per session (740 once invoked), scanned A, original, MIT.

A command for resuming a Claude Code session by loading saved state and the latest session log. It checks whether the state file is present and properly formatted before preparing a briefing.

In plain words
What is it for?
Use it when returning to an earlier Claude Code session and needing its open items, progress, and confidence status.
Why use it?
It restores context about unfinished work without relying on memory from the previous session. Warnings identify when the saved state may be missing or unreliable.

Command

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/vaibhavaher100/wrap-session/unwrap
Clone the repo
git clone --depth 1 https://github.com/VaibhavAher100/wrap-session

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 unwrap

README.md
[![agentmods](https://agentmods.dev/badge/commands/vaibhavaher100/wrap-session/unwrap.svg)](https://agentmods.dev/commands/vaibhavaher100/wrap-session/unwrap)
Your own site
<a href="https://agentmods.dev/commands/vaibhavaher100/wrap-session/unwrap"><img src="https://agentmods.dev/badge/commands/vaibhavaher100/wrap-session/unwrap.svg" alt="Measured on agentmods" 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 740 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 $0.00000 $0.00740
Opus 5 $0.00000 $0.00370
Sonnet 5 $0.00000 $0.00148
Haiku 4.5 $0.00000 $0.00074

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

Security

Grade A, and why

unwrap 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 4d 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.

commands/unwrap.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are resuming a Claude Code session. Execute all steps below in order — no confirmation needed.


Step 0 — Validate logs/state.md

Use the Bash tool:

head -1 logs/state.md 2>/dev/null && wc -c < logs/state.md 2>/dev/null
  • If file is missing or empty: output > [!warning] logs/state.md is missing or empty. Session state is unavailable. Proceed with caution — open items and in-progress work cannot be loaded. then continue with Steps 2-4 as best you can.
  • If first line is not ---: output > [!warning] logs/state.md appears malformed (does not start with YAML frontmatter). The file may have been written incorrectly. Content below may be unreliable. then continue.
  • If valid: proceed silently.

Step 1 — Read current state

Read logs/state.md in full.


Step 2 — Find and read latest session log

Use the Bash tool to find the most recent session file:

ls logs/sessions/*.md 2>/dev/null | sort | tail -1

Read that file in full.


Step 3 — Output structured briefing

Check the confidence field from the session frontmatter first:

  • If confidence: low — prepend a warning block before the briefing (see format below)
  • If confidence is absent — note (pre-schema, confidence unknown)
  • If confidence: medium — note it inline, no separate warning needed

Output the briefing in this exact format:

## Session Resumed

**Last session:** <session-id> (<session-date>)
**Summary:** <summary from frontmatter>
**Confidence:** <value> <— if low, see warning above>

### What was in progress
<In Progress section from logs/state.md — or "Nothing" if empty>

### Open items
<Open Items section from logs/state.md, preserving [carried N] tags>

### Health
<one-line status from Health in logs/state.md>

### Active decisions (last 3)
<Last 3 entries from logs/decisions.md — title + Chose line only>

Low confidence warning format (prepend before briefing):

> [!warning] Low-confidence session log
> The previous session (`<session-id>`) was logged with **low confidence** — compaction occurred and early context was lost. Key actions or decisions may be missing from the log. Do not rely on the session log as a complete record. Cross-check with `logs/state.md` and `logs/decisions.md` before resuming work.

Read the full file on GitHub · 88 lines

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. 4d ago First seen · 88 lines · 0 tokens per session scan A 178b833fbb0b

Subscribe to this mod's changes

unwrap is a command published in the GitHub repository VaibhavAher100/wrap-session (1 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 740 tokens. 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-31.