self-restart

self-restart is a command for Claude Code from Marcel-Bich/marcel-bich-claude-marketplace. It costs 27 tokens per session (4,439 once invoked), scanned A, original, MIT.

A command that restarts a running Claude Code session and resumes the same session, usually so updated add-ons can load.

In plain words
What is it for?
Use it to dry-run or perform a confirmed session restart, optionally with an update, delay, announcement, or cancellation.
Why use it?
It avoids manually stopping, reopening, and reconstructing the session after an update, while checking conditions before making changes.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the credo plugin — 28 skills, 21 commands, 7 hooks shipped together

Good fit Use it to dry-run or perform a confirmed session restart, optionally with an update, delay, announcement, or cancellation.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Marcel-Bich/marcel-bich-claude-marketplace
Claude Code
/plugin install credo

Made for: Claude Code.

Or install credo, the plugin that ships this one along with the rest of its 28 skills, 21 commands, 7 hooks.

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 self-restart

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/self-restart/github.svg)](https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/self-restart)
Your own site
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/self-restart"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/self-restart/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 self-restart

Your own site · 80×15
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/self-restart"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/self-restart.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,439 The whole file, excluding the scripts and references it only reads on demand.
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.
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.00027 $0.04439
Opus 5.5 $0.00011 $0.01776
Sonnet 5.5 $0.00005 $0.00888
Haiku 4.5 $0.00003 $0.00444

Measured 15d ago against content hash 8a73ac64f020, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-restart 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 15d 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.

plugins/credo/commands/self-restart.md · 276 lines

How it starts

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

Credo Self-Restart

Lets a running Claude Code session restart itself - typically to load plugin updates ("cc-up") - and come back as EXACTLY the same session in the SAME profile, continuing on its own without a human prompt.

Helper: ${CLAUDE_PLUGIN_ROOT}/scripts/credo-self-restart.py

Action What it does
check (default) Dry run. Gathers and validates everything and prints the plan (target pid, config dir, cwd, session id, transcript, relaunch method, dialog guard, restored permission mode, relaunch command, update allowlist). Changes nothing. Exit 1 with a clear reason if any precondition fails.
run --no-background-work (--user-confirmed | --announce S) [--update] [--reason TEXT] [--delay S] First the owner-rule guard (below), then the background guard (--no-background-work is required, see below): refused -> exit 3, nothing started. Then validates exactly like check. On any failure nothing is stopped, an ntfy push goes out (if configured) and it exits 1. Otherwise it spawns a fully detached worker and returns at once. With an announce period it prints the announcement and sends an ntfy push first. Refuses (exit 1) while another restart is still pending.
cancel Marks the pending restart as cancelled and terminates its waiting worker; the session keeps running. Exit 1 with "nothing to cancel" when nothing is pending (also once the worker has started stopping the session - then it is too late).
status Prints the state line (pending / cancelled / stopping / relaunched / failed: ...) with the scheduled stop time, the last marker (<configdir>/credo/self-restart.json) and the log tail.

Owner rule - when the agent may use it

Owner rule: self-restarts may run without the Ask tool, but ONLY in credo autonomous mode and ONLY with a 5-minute announcement beforehand so the user can still react. Never self-restart on the agent's own initiative outside autonomous mode - the user may be typing a prompt that would be lost; outside autonomous mode always ask via the Ask tool.

Read the full file on GitHub · 276 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. 15d ago Changed · +49 lines 8a73ac64f020
  2. 16d ago First seen · 227 lines · 27 tokens per session scan A e6823f26739a

Subscribe to this mod's changes

self-restart is a command published in the GitHub repository Marcel-Bich/marcel-bich-claude-marketplace (12 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 4,439 once invoked, about $0.0001 per session on Opus 5.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-10-09.