daemon-restart
Skill4 starsChanged 7 months agoMITView on GitHub
Restart the cookiedclaw Claude Code session via the gateway's `restart_runtime` MCP tool. Use after installing a new skill / plugin / MCP server (anything that's only discovered at startup), or when the agent itself asks to be reborn. Requires `/cookiedclaw:setup` to have been run first.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcCursor rule
- daemon-statusSkill
- debugSkill
- fal-setupSkill
- install-skillSkill
- setupSkill
- supermemory-setupSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
If this prints anything other than active, the gateway isn't running and there's nothing to restart.
- Very specific: line 48
If the gateway itself is what you need to restart (e.g.
- Very specific: line 49
If the restart fails (no liveServers after ~30s), surface systemctl --user status cookiedclaw-gateway --no-pager so the user sees the …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Restart cookiedclaw
Restarts the cookiedclaw Claude Code session. The current process (and you, the agent inside it) gets terminated by the gateway's supervisor, then a fresh CC starts with the same plugin, channel, and identity files.
Pre-flight
Confirm the daemon mode is set up:
systemctl --user is-active cookiedclaw-gatewayIf this prints anything other than active, the gateway isn't running and there's nothing to restart. Tell the user to run /cookiedclaw:setup first.
Warn the user, then restart
Send a Telegram message warning the user, because the next thing that happens is your own death:
🔄 Restarting cookiedclaw — I'll be back in a few seconds. Conversation continues via
--continue; identity files (IDENTITY/USER/SOUL) reread on boot.
Then call the gateway's restart_runtime MCP tool:
mcp__cookiedclaw__restart_runtime { "reason": "skill/plugin reload via /cookiedclaw:daemon-restart" }The tool returns immediately. The gateway delays the actual SIGTERM by ~2 seconds so this skill can return and the warning message above can flush to Telegram before the channel server goes down with the rest of CC. End your turn after issuing the tool call — don't try to send another message; everything past this point happens in the next session.
After restart
The fresh CC process will:
- Reload all skills, plugins, and MCP servers (this is the whole point)
- Reconnect to the gateway over MCP, which republishes the bot menu
- Reload
IDENTITY.md/USER.md/SOUL.mdfrom the workspace - Resume the previous conversation via
claude --continue(baked into the launcher) — recent context survives the restart
The user will not see a "back online" message automatically. If continuity matters, the user pings the bot; the new session picks up the DM and continues the prior thread.
Notes
- This skill restarts only the CC child, not the gateway itself. The Telegram bot, MCP-over-HTTP server, and progress endpoint stay up across the restart — you'll just briefly have an empty
liveServersset until the new CC reconnects. - If the gateway itself is what you need to restart (e.g. to pick up a new gateway binary), that's a
systemctl --user restart cookiedclaw-gatewayjob, not this skill. - If the restart fails (no
liveServersafter ~30s), surfacesystemctl --user status cookiedclaw-gateway --no-pagerso the user sees the journal tail.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

