---
name: cortex-disconnect
description: "EXPLICIT INVOCATION ONLY. Disconnect Cortex from the current repository while preserving its brain. Use only for /cortex-disconnect or an explicit request to disconnect Cortex from a project."
user-invocable: true
disable-model-invocation: true
---

# Cortex Disconnect

Disconnect the current repository from Cortex. Run:

```sh
cortex-local disconnect
```

The command removes only Cortex's Claude Code and Codex project MCP entries, lifecycle hooks, and Git-local binding. It preserves the registered brain and all brain data. Do not edit project configuration or Git config yourself, and never delete brain data.

On success, report the preserved brain name when the returned `brain` is non-null; otherwise report that no Git-local brain binding existed. Tell the user to restart Claude Code and Codex. On a stale or partial result, report completed and pending effects exactly; do not retry automatically.
