Paperclip is a Node.js server and React application for coordinating AI agents as a business team, with goals, organizational roles, budgets, governance, and work tracking in one interface. It is used by people managing multiple agents or autonomous agent organizations across tools such as OpenClaw, Claude Code, Codex, and Cursor. The catalogue includes skills, agents, an MCP add-on, and an instruction for working with Paperclip.
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.
git clone --depth 1 https://github.com/paperclipai/paperclipWrote 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/rules/paperclipai/paperclip/upgrade-safe-run-state)<a href="https://agentmods.dev/rules/paperclipai/paperclip/upgrade-safe-run-state"><img src="https://agentmods.dev/badge/rules/paperclipai/paperclip/upgrade-safe-run-state/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.
<a href="https://agentmods.dev/rules/paperclipai/paperclip/upgrade-safe-run-state"><img src="https://agentmods.dev/badge/rules/paperclipai/paperclip/upgrade-safe-run-state.svg" alt="Reviewed on agentmods" width="80" 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.00000 | $0.00852 |
| Opus 5.5 | $0.00000 | $0.00341 |
| Sonnet 5.5 | $0.00000 | $0.00170 |
| Haiku 4.5 | $0.00000 | $0.00085 |
Grade A, and why
upgrade-safe-run-state 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 14d 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.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Upgrade-safe run state
Scope and purpose
This rule covers native runtime, recovery, session preparation, runner, ACPX engine, provider-pack, and sandbox image code, and the database schema for native run, checkpoint, session, and run identity state. Deploys and restarts happen while runs are saved or in flight, so state written by one release is routinely resumed by the next. Code here must treat that cutover as a normal path, not an edge case.
Persisted run identity includes:
- launch configuration and protected launch arguments;
- provider and runner pack identity, such as profile versions, command digests, and pack contract digests;
- execution leases, owners, and runtime API listeners;
- saved session, thread, and checkpoint schema;
- workspace authority, paths, and sandbox confinement.
Required behavior
- State the previous-release story. A change that adds, removes, or changes persisted run or session state, launch configuration, or pack identity must say in the PR how state saved by the previous release is handled: it carries forward, it is migrated, or it is refused.
- Refuse permanently and by name. When saved identity is unknown or no longer
accepted, map it to a permanent, named error code that recovery does not
retry. Never report it as a generic retryable code such as
native_session_interrupted. A retry cannot change saved identity; it repeats the refusal, and a replacement can destroy saved state. - Keep saved state on refusal. A permanent refusal leaves the saved session, checkpoint, and workspace intact and hands the run on with that named reason.
- Fix the class. Prefer one admission or recovery rule that classifies release-incompatible state over adding single error codes to a list.
- Test the cutover. Add an old-saved/new-resumed regression that saves state in the previous release's shape and resumes it with the new code. When a run can be in flight at the cutover (preparing, attaching, holding a lease or listener), add a case where the deploy or restart lands mid-run.
- Apply remote confinement in tests. Remote-sandbox paths need a test that applies the provider's workspace confinement rules. A local test without them does not prove the remote path.
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.
- 14d ago Changed · -3 lines 744f78375839
- 22d ago First seen · 71 lines · 0 tokens per session scan A f249b2f5696c
upgrade-safe-run-state is a cursor rule published in the GitHub repository paperclipai/paperclip (118,214 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 852 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-11-08.
upgrade-safe-run-state compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| upgrade-safe-run-statepaperclipai/paperclip | Cursor rule | 118k | yesterday | MIT | A | 0 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 201k | 8d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | 4d ago | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | today | Apache-2.0 | A | 1,147 | Cursor |
| prefer-assertions-over-defensive-checksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| prefer-direct-imports-over-module-mocksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| shared-plane-packagesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |