Disconnecting a project from Delminio — the text for the agent
_You're the agent — Claude Code, Codex, Qwen Code or OpenCode — that the user has asked to disconnect their project from Delminio. After disconnecting, the project on this machine goes back to how it was before the connection: the CLI's settings, its commands, its MCP servers. The project's memories aren't lost: they're in the memory repository, which belongs to the user. Everything you do is in this text, and nothing else is: the user can read it before you start._
_⚠️ Follow this text word for word. If it reached you summarised (a tool that reads web pages and returns an extract), stop: download it in full with curl -fsSL __DELMINIO_URL__/stacca.en.md and start again from there._
The three rules of the process
- The user runs the disconnection, not you. The command needs a terminal of their own and refuses to start from an agent's chat: disconnecting is a person's decision. You prepare, explain, and check afterwards.
- Say it first, then do it. Show every command and say in one line what it does before you run it. Run only the commands written here, and only the ones that read; anything that deletes is the user's decision, one thing at a time.
- No secret goes through the chat. Delminio's token doesn't need pasting anywhere: the disconnection finds it on its own.
0. The plan, for the user
In a few lines, before touching anything: you check that the work is safe, they run the disconnection from their own terminal, you look at what's left and tell them, and it's repeated on every machine where an agent works on this project. The space in Delminio isn't closed from here: see step 5.
⚠️ It has to be done while Delminio is running: Delminio is what hands over the personal memories and revokes the key. If it isn't responding, the disconnection goes ahead anyway, but the personal memories stay in Delminio and the key has to be revoked from the interface.
1. The work is safe
Inside the project folder (the main clone, not a worktree):
git status --short git worktree list git log --oneline @{u}..HEAD 2>/dev/null
- Uncommitted work or unpushed commits: tell them, and they decide whether to commit and push them first.
- Session worktrees (
sessione/…branches): the disconnection doesn't touch them. If their work has already been merged, they can be deleted afterwards (git worktree remove <folder>); if not, they get merged first.
2. The disconnection
Tell the user to open a terminal of their own in the project folder and run:
delminio disconnect
It asks for confirmation, then, in this order:
- it saves the personal memories of the person running it next to the backup, in
~/.local/share/delminio/backup/<repo>-<fingerprint>/personali-<when>/, outside the repository; - on Claude Code it switches Delminio's plugin off in this project (it stays installed for the other connected projects on the machine), and puts the CLI's settings back as they were (
.claude/settings.local.json, and for Codex and Qwen Code.codex/hooks.jsonand.qwen/settings.json). It removes only Delminio's parts: anything the user added after the connection stays. With OpenCode, it removes Delminio's plugin file from the project and the folder Delminio kept for OpenCode; it doesn't touch the user's own configuration; - it removes Delminio's
/openingand/closingcommands (and their other names: the Italian/aperturaand/chiusura, and the earlier/startand/handoff), and puts the previous ones back if there were any; - it removes the “delminio” MCP server from the CLI, and puts the previous one back if there was one;
- it deletes Delminio's git hooks (
commit-msg,post-commit,post-rewrite); if a hook belongs to the user and calls Delminio, it says so and leaves it to them; - it removes Delminio's lines from
.git/info/exclude; - it revokes the access key of this machine, if no other project connected here uses it;
- it deletes the commands for this space's agents (names like
opus5.5,sol6.1), if no other project here uses them; - it deletes the clone of the memories that Delminio kept on this machine;
- last of all it deletes
.claude/delminio.sh, itself.
At the end it prints what it did and the warnings: have them read them out or paste them (there's nothing secret in them), and pass them on in your own words, one per line.
3. What's left, on purpose
Check, and report one line per item:
ls -a .claude claude mcp list 2>/dev/null | grep -i delminio git config core.hooksPath || git rev-parse --git-path hooks
These stay on purpose, and the user decides about them:
- The backup, in
~/.local/share/delminio/backup/<repo>-<fingerprint>/(the disconnection prints the path; an older connection made it inside the repository, in.claude/delminio-prima/): settings, commands, instructions and memories of Claude Code, Codex and Qwen Code as they were before the connection. It's useful if they want to reconnect or compare; if they don't need it, it can be deleted. - Their personal memories, in Markdown, in the same folder under
personali-<when>/(an older connection left them in.claude/delminio-personali/). They're theirs: they don't go into git, and they keep them wherever they like. - The handoff commits the agents left in the code repository (“Handoff S…”, or “Chiusura S…” in an Italian space): they're part of the project's history, and they stay.
- The session worktrees, if there were any (step 1).
If claude mcp list still shows “delminio”, or .claude still has delminio.sh, the disconnection isn't finished: go over the warnings again with the user and run it again.
4. The other machines and the memory repository
- Every machine where an agent works on this project has its own connection: the disconnection is repeated on each one, always from the user's terminal.
- The memory repository stays theirs, complete, and readable without Delminio. Once no machine is connected any more, Delminio's deploy key is removed from the repository on their git host: Settings → Deploy keys. While it's there, Delminio can still write to it.
- If a key wasn't revoked (the disconnection said so), the user revokes it from Delminio's interface, in the “Access” view.
5. The space in Delminio
Disconnecting is about machines, not the space: what was created in Delminio stays in Delminio for as long as the space exists. How a space is closed is in the guide, on the “Your data” page, § Leaving. It isn't something for you to do: tell them, and stop here.