Disconnect, stop, or uninstall
Choose the outcome you want:
Run these as the same operating-system user who installed and connected CMX. Use
cmx harness list to see which clients are routed. Restart each changed coding client so it picks up the direct endpoint.
What stop does
cmx stop restores managed client settings to direct routing before it shuts down the gateway. If CMX cannot safely restore a client file, it reports the error and leaves the gateway running so that client is not stranded on a dead port. Resolve the conflict in that client’s settings, then retry.
A later cmx start can reconnect previously selected routes if the direct client settings have not changed. To remain direct, explicitly disconnect or disable the desired client before stopping. If you are running installer setup again, answer n to cmx setup --ask-connect-ready; that answer also clears pending automatic reconnection.
CMX restores the client’s configuration structure and preserves unrelated user edits made while routed. Formatting such as TOML quote style may differ. CMX does not undo its own provider map in config.json during client restoration.
Uninstall the standalone binary
Run this in an interactive terminal:--keep-data or --keep-config. Without these flags, local usage history and cached summaries are deleted. These options do not delete or alter provider accounts or native client credentials.
cmx remove and cmx rm are aliases for cmx uninstall, and --force (-f) is an alias for --yes (-y). Restart each coding agent after uninstalling so it picks up its restored configuration.
Clean up the installation method
cmx uninstall removes the running executable and CMX-managed state. The package manager may still record an installed package, and an installer-created shortcut or PATH entry can remain. After cmx uninstall succeeds, do the matching cleanup:
- Linux / macOS
- Windows PowerShell
If you installed through npm or pnpm, run the matching command:For a standalone install, check
command -v cmx in a new terminal. If another copy remains, identify its path before removing it. The normal standalone locations are /usr/local/bin/cmx or ~/.local/bin/cmx.cmx uninstall reports a conflict, follow Troubleshooting or contact support with the error text, not the client config or API keys.