Source: https://keypaste.com/developers/set-what-each-agent-gets/
Last updated: 2026-12-01

# Set what each agent gets

You’ll have an agent that never gets your notes, may ask to run commands, and gets your environments’ variables without asking.

## Prerequisites

- An AI tool [connected](https://keypaste.com/developers/mcp-setup/), such as Claude Code, whose agent is named `claude-code`.
- The vault unlocked in the desktop app or `keypaste approve`. A change made while nothing holds the vault is ignored until you set it again where the vault is unlocked.

## 1\. See the current rules

Terminal window

```
keypaste clients
```

```
  VALUE                  EVERY AGENT  passwords              ask  custom fields          ask  environment variables  ask  …  notes                  ask  attachments            ask  passkeys               block
  AGENT        RUN  claude-code  off
```

Every kind is Ask until you change it.

## 2\. Block a kind for one agent

Terminal window

```
keypaste clients claude-code --set notes=block
```

```
  ✓ claude-code · notes=block set; sealed by the process holding the vault
```

The kinds are `password`, `custom`, `variable`, `totp`, `notes` and `attachment`, each `ask`, `block` or `settings` to follow the general rule.

## 3\. Let it ask to run commands

Terminal window

```
keypaste clients claude-code --run on
```

```
  ✓ claude-code · run on; each run is still asked; sealed by the process holding the vault
```

## 4\. Allow a kind without asking

A terminal can’t prove a person agreed, so an Allow is made in the app:

1.  In Agents, choose Claude Code.
2.  Under When Claude Code asks, choose Per kind….
3.  Set Environment variables to Allow without asking, and confirm.

A protected stage such as `prod` is still asked every time.

## 5\. Undo an Always allow

`keypaste clients` lists each Always allow an agent has kept, with a key:

Terminal window

```
keypaste clients claude-code --forget 54380d03ad11
```

## Next steps

- [Agent settings](https://keypaste.com/developers/policy/): every kind, protected stages and where settings are kept
- [How approvals work](https://keypaste.com/developers/how-approvals-work/)
- [Sandbox your AI tool](https://keypaste.com/developers/sandbox-your-ai-tool/)
