Stop

Stop is a hook for Claude Code from jagoff/memo. Its token cost is not measured, scanned A, original, MIT.

A stop hook configuration that runs several memo commands when an agent finishes. The commands save a session record, refresh its summary and synchronise the saved memory across Macs when supported.

In plain words
What is it for?
Use it to automate end-of-session capture, checkpoints, summary refreshes and cross-device memory synchronisation.
Why use it?
It preserves the agent's session information and keeps memory updates from being lost when work ends.

Hook for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the memo plugin — 4 skills, 1 command, 4 hooks, 1 MCP server shipped together

One of 4 entries in hooks.json upstream. Installing this one merges just its entry into your config; the other 3 are separate, each on its own page.

Good fit Use it to automate end-of-session capture, checkpoints, summary refreshes and cross-device memory synchronisation.

Compare 6 hooks from other repositories ↓
Install with agentmods
npx agentmods add hooks/jagoff/memo/stop
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/jagoff/memo

Made for: Claude Code.

Or install memo, the plugin that ships this one along with the rest of its 4 skills, 1 command, 4 hooks, 1 MCP server.

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 Stop

README.md
[![agentmods](https://agentmods.dev/badge/hooks/jagoff/memo/stop/github.svg)](https://agentmods.dev/hooks/jagoff/memo/stop)
Your own site
<a href="https://agentmods.dev/hooks/jagoff/memo/stop"><img src="https://agentmods.dev/badge/hooks/jagoff/memo/stop/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 Stop

Your own site · 80×15
<a href="https://agentmods.dev/hooks/jagoff/memo/stop"><img src="https://agentmods.dev/badge/hooks/jagoff/memo/stop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

Stop 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 commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.

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.

hooks/hooks.json · 49 lines

How it starts

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

{
  "Stop": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "MEMO_NONINTERACTIVE=1 memo capture-stop",
          "timeout": 30,
          "async": true
        },
        {
          "type": "command",
          "command": "MEMO_NONINTERACTIVE=1 memo session checkpoint",
          "timeout": 5,
          "async": true
        },
        {
          "type": "command",
          "command": "MEMO_NONINTERACTIVE=1 memo session refresh-summary",
          "timeout": 20,
          "async": true,
          "statusMessage": "memo: updating session summary…"
        },
        {
          "type": "command",
          "command": "MEMO_NONINTERACTIVE=1 memo sync once --quiet",
          "timeout": 90,
          "async": true,
          "statusMessage": "memo: pushing memories cross-Mac…",
          "comment": "Final flush via the single lock-guarded machine coordinator (pull-rebase-before-push). Listed last so this session's capture-stop write is on disk first. Lock-guarded so it never races the per-prompt `sync auto` or a sibling session. --quiet soft no-ops on local-tier (no remote) installs."
        },
        {
          "type": "command",
          "command": "MEMO_NONINTERACTIVE=1 MEMO_AGENT_TTY=${MEMO_AGENT_TTY:-$(tty 2>/dev/null | grep -E '^/dev/' | head -1)} memo session idle-maintenance --mode reflect",
          "timeout": 360,
          "async": true,
          "comment": "Longer idle consolidation: waits for a longer quiet window (MEMO_SESSION_IDLE_REFLECT_SECS, default 5m) after the turn finishes and then synthesizes the active session into a durable arc note. MEMO_AGENT_TTY for terminal notifications. Stale workers self-cancel if a newer prompt updated the session snapshot. Async + soft-fail. Disable with MEMO_CAPTURE_DISABLE=1."
        },
        {
          "type": "command",
          "command": "MEMO_NONINTERACTIVE=1 memo dream if-due",
          "timeout": 300,
          "async": true,
          "comment": "Daily body 

Read the full file on GitHub · 49 lines

Same file

What else hooks.json configures

This page is one entry in a file that holds 4. Installing the file brings all of them; each is measured and scanned on its own page.

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 · 49 lines scan A 6f89e4a0e20b

Subscribe to this mod's changes

Stop is a hook published in the GitHub repository jagoff/memo (22 stars, last pushed today), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. 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.