# Switching controls on

How you turn controls on, choose who decides for your agents, choose which kinds of action are checked, and what happens when you turn them off again. What controls are and what they cost is on [Controls](/product/controls).

## Before you start

- Controls are optional. The account works with them off.
- They are a second subscription on top of the plan, so the plan has to be active first.
- Only the owner or an admin turns controls on or changes them. An agent can neither read nor change its own controls.

## Turn controls on

```bash
npx @getstackrun/cli billing subscribe controls
```

The command returns a link to Stripe's checkout page. Controls are on when the checkout is complete. From code: `stack.billing.subscribeControls()` returns the same link. You can also start it on the billing page of the Console. There is no tool for this step.

- The free trial is offered once.
- The command needs the billing:write scope.
- billing subscriptions shows where the subscription stands and how many checks ran this month.

## What changes at that moment

- Each agent with an account gets a policy equal to the access it already has. Nothing an agent could do before is refused until you tighten that policy.
- From then on each checked action is put to the policy before it runs.
- The record becomes readable, including everything written before.
- Flagged content is withheld from agents, where before it was delivered with its flag. You can change that: see Flagged content.
- You can give an agent a monthly budget, when you open its account or later.

## Choose who decides

```text
Who decides for my agents right now?
```

The client calls `stack_get_control_socket`. There are three answers:

- hosted - STACK checks each action against your policy. This is what you get with controls on.
- remote - a server of your own decides. You switch this on by verifying your server: see Your own decision server.
- none - nothing is checked.

```bash
npx @getstackrun/cli control-socket get
npx @getstackrun/cli control-socket mode hosted
npx @getstackrun/cli control-socket mode none
```

Choosing `none` counts as loosening and needs your approval in a browser. Going from `none` to `hosted` applies at once. Going from your own server to `hosted` needs your approval in a browser. The tool is `stack_set_control_mode`.

## Choose which kinds of action are checked

```bash
# Check only messages and payments.
npx @getstackrun/cli control-socket checked-types email.send sms.send card.checkout wallet.payment

# Check every kind again.
npx @getstackrun/cli control-socket checked-types --all
```

- Every kind is checked by default, including kinds added later.
- A kind that is not checked is not asked and not charged.
- Adding a kind applies at once. Taking one off counts as loosening and needs your approval in a browser.
- The kinds cover model calls, calls to connected services, tools, email, texts, Telegram, calls, meetings, the browser, card and wallet payments, the workspace, hand-offs, skills, wake-ups, the drive, memory, the brain, websites, payment links, letters, post and making.
- The tool is stack_set_control_checked_types.

## Changes that need your approval

Anything that makes controls looser needs a person in a signed-in browser. The call answers `403 GOVERNANCE_APPROVAL_REQUIRED` with a link. You approve there, and the same call then goes through. An approval works once and lasts 24 hours. It can never be given in a chat. Anything that makes controls tighter applies at once.

## Turn controls off

Cancel the controls subscription on the billing page of the Console.

- Nothing is suspended. Your agents keep working, and nothing is checked any more.
- Flagged content is delivered with its flag again.
- The record is still written, and can be read again when controls come back on.
- A monthly budget you gave an agent keeps applying.
- You are emailed once if the subscription lapses.

A server of your own keeps deciding without the controls subscription. See [Your own decision server](/docs/controls/own-server).

## When it is refused

- 402 PLATFORM_SUBSCRIPTION_REQUIRED - the plan is not active. Start it first.
- 409 SUBSCRIPTION_CONFLICT - controls are already on.
- 409 CONTROLS_NOT_ENABLED - you chose hosted, or set a policy, with controls off.
- 403 GOVERNANCE_APPROVAL_REQUIRED - the change makes controls looser. Approve it in the browser.
- 402 CONTROLS_REQUIRED - you read the record or changed a detector setting with controls off.

## Next

Tighten what your agents may do in [Policies](/docs/controls/policies).
