cc-reload-plugin CLAUDE.md

cc-reload-plugin CLAUDE.md is an instructions file for coding agents from betmoar/cc-reload-plugin. It costs 10,296 tokens per session, scanned A, original, MIT.

A maintainer guide for the cc-reload plugin, which keeps a Claude Code session's working context available across resets, resumes, and context compaction.

In plain words
What is it for?
It is for understanding the plugin's control flow, on-disk state, important assumptions, and the connections between files that must be updated together.
Why use it?
It explains the plugin's stored state, hooks, commands, and design constraints so maintainers can change it without breaking session continuity.

Instructions file

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 instructions/betmoar/cc-reload-plugin/claude-md
Clone the repo
git clone --depth 1 https://github.com/betmoar/cc-reload-plugin

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 cc-reload-plugin CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/betmoar/cc-reload-plugin/claude-md.svg)](https://agentmods.dev/instructions/betmoar/cc-reload-plugin/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/betmoar/cc-reload-plugin/claude-md"><img src="https://agentmods.dev/badge/instructions/betmoar/cc-reload-plugin/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 10,296 This file is loaded in full into every session.
When invoked 10,296 The same file — it is already loaded in full.
Security scan A 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.1 $0.10296 $0.10296
Opus 5 $0.05148 $0.05148
Sonnet 5 $0.02059 $0.02059
Haiku 4.5 $0.01030 $0.01030

Measured today against content hash de4e8bf54446, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

cc-reload-plugin CLAUDE.md scanned grade A 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 today.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fail-open-silent on literally anything going wrong (down, no `curl`, timeout, bad JSON, missing or
CLAUDE.md · 435 lines

How it starts

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

cc-reload — maintainer handoff

This file is the mental model for anyone (human or agent) changing this plugin. Read it before touching hooks/. The README explains what the plugin does for users; this explains why the code is shaped the way it is, which invariants are load-bearing, and how to change each piece without breaking the others.

What this is, in one paragraph

Four bash hooks + three slash commands + one skill that keep a Claude Code session's working thread alive across context resets. State machine on disk under the user's project at .reload/: a digest (session.md), a one-shot arm marker (pending, now stamped with its arming session id when known), a two-pass handshake marker (summarizing), a notify ladder (notified), a model/window stamp (model), per-project config (config), and — since 0.3 — side-filed digests from a detected cross-session collision (session.<id>.md). The fourth hook, PreToolUse, is a same-session enforcement point for that collision guard, not a new continuity mechanism. There is no daemon, no state anywhere else, and no network on the per-turn hot path — SessionStart makes one optional loopback-only lookup against a local cc-proxy (see the proxy_window() decision below), fail-open, never repeated per-turn.

Control flow (the whole system)

Stop hook (every turn end)
  ├─ summarizing marker present?  → PASS 2: consume marker; if digest exists, arm `pending`
  │     and VERIFY the arm with -f (not a regular file → "reload NOT armed", never "saved")
  │     (fresh digest → success msg; digest not rewritten this turn → arm anyway, warn honestly;
  │      no digest → do NOT arm, warn)
  │  (occupancy below = the last MAIN-THREAD assistant row of a tail window of the transcript,
  │   per-line parsed; full-file stream only if the window holds none — invariant 14)
  ├─ stop_hook_active && no marker? → stand down (broken handshake must never re-block = loop)
  ├─ occupancy < budget?          → clear the `notified` ladder, exit silently
  └─ occupancy ≥ budget           → branch on context_budget_mode (default notify):
        ├─ snapshot mode AND not armed (NO entry at `pending`: -e, not -f — invariant 15)   [legacy `checkpoint` aliases here]
        │   → PASS 1: write `summarizing` marker and VERIFY it with -f (or refuse to block),
        │     emit {decision:"block"} re-injecting "write .reload/session.md, then STOP"
        └─ notify mode, OR snapshot mode already armed
            → laddered nudge: {systemMessage} only — never blocks, zero model tokens.
              Fires on first crossing, then only at last-notified +10 points (`notified`
              stores the %). Ladder unwritable → silent (else it would nag every turn).

PreCompact hook (manual /compact or auto-compaction)
  └─ arm `pending`; if no digest exists, write a mechanical fallback stub (honest about being thin)

SessionStart hook (startup|resume|clear|compact)
  ├─ stamp model id + resolved window to .reload/model (Stop gets no model field — this bridges it)
  ├─ startup|clear|compact (NOT resume) → purge leaked `summarizing` + `notified`; a handshake
  │     must not outlive its context (see invariant 10)
  └─ `pending` present? → inject digest as additionalContext + visible systemMessage banner
        (WARNS if `pending`'s stamped owner differs from this session's id — never gates on it);
        consume the marker (one-shot). Not armed → do nothing (a deliberate /clear is respected).

PreToolUse hook (model Write/Edit)
  └─ path == $DIGEST && tool is Write|Edit && payload has session_id?
       → claim-digest.sh: foreign + fresh incumbent -> side-file + warn; ALWAYS exit 0 (permit)

Read the full file on GitHub · 435 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. today Changed · +33 lines · +874 tokens per session de4e8bf54446
  2. yesterday Changed · +157 lines · +4,209 tokens per session 7beca7b18acf
  3. 5d ago First seen · 245 lines · 5,213 tokens per session scan A 05e202842025

Subscribe to this mod's changes

cc-reload-plugin CLAUDE.md is an instructions file published in the GitHub repository betmoar/cc-reload-plugin (1 stars, last pushed today), licensed MIT. It adds 10,296 tokens to every session, about $0.0515 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.