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.
npx agentmods add commands/hamr0/agentic-toolkit/stashgit clone --depth 1 https://github.com/hamr0/agentic-toolkitWrote 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.
[](https://agentmods.dev/commands/hamr0/agentic-toolkit/stash)<a href="https://agentmods.dev/commands/hamr0/agentic-toolkit/stash"><img src="https://agentmods.dev/badge/commands/hamr0/agentic-toolkit/stash.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00009 | $0.00842 |
| Opus 5 | $0.00005 | $0.00421 |
| Sonnet 5 | $0.00002 | $0.00168 |
| Haiku 4.5 | $0.00001 | $0.00084 |
Grade A, and why
stash 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 2d 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.
What it actually says
Save session context for compaction recovery or handoffs.
Guardrails
- Write only what the brief contains. The subagent expands the brief into a file; it does not research, re-derive, or infer. Every fact, number, SHA, path, and identifier in the stash comes from the brief verbatim — never invent, never round, never fill a gap with a plausible guess. Missing detail stays missing.
- Escalate, never assume. Anything the subagent cannot do, cannot verify, or that this spec does not cover → report it back to the orchestrator (the main session) rather than improvising. Never widen scope beyond writing the file and counting the backlog.
- Explicitly select your tool's mid tier. State the tier on the spawn — do not omit it and rely on a default. An omitted tier inherits the parent's tier, which is not the same thing as the balanced one. Pick the judgment-capable tier that is cheaper and faster than your top reasoning tier. Not the cheapest/fastest tier: on judgment work it measurably degrades (misclassification rates several times higher). Choose by tier, not by a vendor model name copied from this file — names drift, and this command ships to several tools.
- Background dispatch where supported. Run the write-up subagent in the background (non-blocking) so the session isn't held up waiting on formatting/file I/O. Fall back to writing inline (today's behavior) if your tool has no subagent or background-dispatch mechanism.
What it does
-
Drafts a compact brief of current conversation context, key decisions, active work in progress, and findings/insights — done inline, since only the running session holds full conversation context
-
Hands the brief to a subagent on the mid-tier model (see Guardrails) to expand into the full stash file at
.amp/stash/<name>.md, dispatched in the background where the tool supports it. Falls back to writing inline if subagent/background dispatch isn't available -
Enables context restoration after compaction
-
Consolidation nudge — whichever actor wrote the file (the subagent, or the session itself on the inline fallback) counts the unprocessed backlog after saving:
unprocessed = (files in .amp/stash/*.md) − (entries in .amp/remember/.processed)(a missing.processedmanifest means 0 processed). Ifunprocessed >= 5, end with one line:📝 N stashes since last consolidation — run
/rememberto fold them into memory.No counter is stored — the count is derived each time, and running
/rememberupdates.processed, so the backlog drops on its own. Just emit the nudge; never run/rememberautomatically.
When to use
- Before long-running tasks that may trigger compaction
- When handing off work to another agent or session
- After completing major investigation or analysis
- Before taking a break from complex multi-step work
Commands
# Stash with auto-generated name
/stash
# Stash with custom name
/stash "feature-auth-investigation"
# List available stashes
ls .amp/stash/
# Restore from stash
cat .amp/stash/<name>.md
Reference
- Stashes stored in
.amp/stash/(project-local) - Automatically includes: timestamp, active plan, recent decisions
- Maximum context retention with minimal token usage
- When dispatched in the background, the "Stashed to X" confirmation and consolidation nudge arrive as the subagent's completion notification rather than inline in the same turn
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.
- 2d ago First seen · 73 lines · 9 tokens per session scan A 012d4f910c08
stash is a command published in the GitHub repository hamr0/agentic-toolkit (22 stars, last pushed today), licensed Apache-2.0. It adds 9 tokens to every session and 842 once invoked, about $0.0000 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-09-03.
Other commands, from other repositories
OPSX: Update
Update a change - revise existing planning artifacts and keep them coherent (Experimental).
OPSX: Apply
Implement tasks from an OpenSpec change (Experimental).
OPSX: Propose
Propose a new change - create it and generate all artifacts in one step.
OPSX: Sync
Sync delta specs from a change to main specs.
OPSX: Archive
Archive a completed change in the experimental workflow.
OPSX: Explore
Enter explore mode - think through ideas, investigate problems, clarify requirements.