CLM integration

CLM for Claude Code

Add model-aware subagent routing and end-of-turn behavior checks to an existing Claude Code setup. Tool-call gating starts in shadow mode.

about 5 minuteshosted CLMdevice sign-in

Prerequisites

  • Claude Code installed and signed in to your Anthropic account.
  • Git available in your terminal so Claude Code can add this repository as a plugin marketplace.
  • A browser and a Metatheory team account for the CLM device sign-in.
What this adds

The plugin can choose cheaper subagent tiers when confident, check completed turns for configured behavior problems, and classify tool calls in shadow mode. CLM can only make a tool decision stricter; it never overrides Claude Code to approve a call.

Step 1

Add the marketplace and plugin

Run both commands in a terminal. The first registers this public repository as a Claude Code marketplace; the second installs its clm plugin.

claude plugin marketplace add metatheoryinc/CLM-Hosted
claude plugin install clm@clm-hosted

Start a new Claude Code session after installation so the lifecycle hooks load.

Step 2

Sign in to hosted CLM

Inside Claude Code, run:

/clm:login

Claude Code shows a browser link and short code. Open the link, sign in with your Metatheory Google account, and approve that code. The plugin stores the personal CLM key for future sessions.

The website does not show your key.

The Sign in page approves device codes and lets you view or revoke issued keys. The device flow hands the new key directly back to the plugin.

Step 3

Verify the integration

Start a new session, then ask the plugin for its current modes and recent actions:

/clm:status

You should see the key source, subagent mode, behavior-check mode and tool-call mode. When CLM changes something, Claude Code displays a short CLM: … notice explaining what happened.

Use /clm:off and /clm:on to pause or resume the plugin across sessions.

Update, configure or remove

claude plugin update clm@clm-hosted

Open /plugin in Claude Code to configure the three integration switches, disable the plugin, or uninstall it. Revoke a personal key at the CLM sign-in page if the machine no longer needs access.

What leaves your machine

For a classified tool call, the hosted service receives the tool name, bounded arguments, working directory and permission mode. With behavior checks enabled, it also receives a bounded rendering of recent prompts, messages, tool calls, results and the final reply. Likely secrets are redacted before sending, but redaction is best effort.

Decision records are stored in the shared CLM collector under your agent identity. Full transcript files and content outside the bounded rendering are not uploaded by the hook.

Billing

Claude Code agent turns and any unsure-case judge calls use your Anthropic account. CLM is a separate decision service; model availability and subscription limits still come from your provider account. Routing may reduce usage in some cases, but savings are not guaranteed.

Get help

Check status first; any CLM error or timeout leaves the normal Claude Code flow in place. The source guide documents modes, thresholds and local configuration in more detail.