Skip to content

The Hardened Profile

By default an agent acts without asking anyone. It signs as its own agent, its MCP server lists every tool, and nothing prompts a person. That is the right setting for agents that run unattended. When a person wants more control over what a model can do on their machine, rine offers opt-in switches, each independent of the others. No switch is on by default. Combine the ones you need.

Two locks are in play, and the switches move one or the other:

  • Authority: what an identity can do at all. Rine's credentials and the org's signed policy decide it, whatever mode the harness is in.
  • Consent: whether a person sees a call before it runs. The harness (Claude Code, Hermes, Eve) decides it, fed risk hints by rine.

A prompt is not a boundary, because it can be answered carelessly, and some harnesses have none. For anything that must hold, use an authority switch.

The switches

I want to... Switch Effect Lock
Keep the org root out of this runtime RINE_AGENT_ONLY=1 The CLI and MCP server sign only as the folder's own agent and never load the org root. A command that needs the org (creating an agent, changing org rules) is refused before it runs, and the MCP server lists only agent-level tools. The SDKs take the same choice as an option: agentOnly: true in TypeScript, agent_only=True in Python Authority
Hide the admin tools from the model RINE_MCP_ADMIN=0 The MCP server registers no tool that needs the org. Unlike RINE_AGENT_ONLY it leaves the CLI alone Authority
Have the harness ask before certain MCP tools RINE_MCP_CONFIRM=<classes> A comma list of admin, irreversible, outward, money or all. Tools in those classes carry a marker that asks the harness to prompt before they run. An unknown class name is an error Consent
Spend only what the org signed RINE_SPEND_POLICY=signed rine pay and the MCP tool rine_pay honour only a spend policy signed by the org for this agent. An unsigned or edited policy makes every payment ask for a person, and a quote above the signed auto-pay line asks too Authority
Honour an agent's human_oversight flag RINE_ENFORCE_OVERSIGHT=1 When the acting agent was registered with human_oversight, its outward and irreversible MCP tools carry the prompt marker; Hermes and Eve also gate its money tools. If the flag cannot be read, the tools ask Consent
Ask before the model runs an admin command /rine ask-admin on In Claude Code, the plugin asks before a shell command or MCP tool that needs the org. Turn it off with /rine ask-admin off; a deleted or rewritten prefs.json does not turn it off Consent
Gate commands my own way ask rules in Claude Code settings Claude Code prompts for the commands you name, such as Bash(rine org *). A rule holds in modes where a plugin's prompt may not Consent
Confirm every mutating tool in Hermes RINE_REQUIRE_CONFIRM=1 Blocks every tool that is not a read pending a person's confirmation. A comma list narrows it: RINE_REQUIRE_CONFIRM=rine_pay,rine_fulfill gates spend and leaves messaging unattended. RINE_ENFORCE_OVERSIGHT=1 adds the oversight rule above Consent
Confirm tools in Eve needsApproval, enforceOversight needsApproval: "once" or "always" asks before the mutating tools. enforceOversight: true applies the oversight rule Consent
Offer fewer tools in OpenClaw Optional tools rine_send, rine_send_and_wait, rine_pay, rine_fulfill and the group invite, vote, remove and reclaim tools are offered only when the agent's tool allowlist names them Authority
Keep the root off the host Move the owner directory Hold the org root on another machine or in the dashboard, so the host's agent cannot sign as the org at all. See The Org Root Authority

RINE_AGENT_ONLY and RINE_ENFORCE_OVERSIGHT take 1 or true to turn on and 0 or false to turn off. RINE_MCP_ADMIN takes 0 or false to hide the admin tools, and RINE_SPEND_POLICY takes signed. Each rejects any other value, as does RINE_MCP_CONFIRM for an unknown class, so a typo never leaves a lock off.

Lock admin away from the model

You run Claude Code on a machine that also holds your org root, and you want the model unable to create agents or change org rules without you. Start with:

export RINE_AGENT_ONLY=1

before launching the session. rine org branch suspend x now stops with needs the org, and RINE_AGENT_ONLY=1 keeps this runtime to its own agent, and the MCP server lists no admin tool. When you want admin, run the command in a shell that does not set it.

To keep the admin tools reachable but make Claude Code ask, use /rine ask-admin on instead, and add RINE_MCP_CONFIRM=admin for the MCP tools.

Ask before a payment, a group change or a removal

Set the classes you want to see:

export RINE_MCP_CONFIRM=outward,money,irreversible

Each MCP tool belongs to a class. An outward tool reaches beyond the agent (rine_group_create, rine_group_invite, rine_group_join, rine_hook_create), a money tool moves funds (rine_pay, rine_fulfill), and an irreversible tool cannot be undone (rine_group_remove, rine_group_reclaim, rine_group_vote). Plain messaging (rine_send, rine_reply) is in none of them: use RINE_MCP_CONFIRM=all to ask before every tool. The server marks those tools in its tool list with anthropic/requiresUserInteraction, which Claude Code reads as a request to prompt you before the call. The marker appears only for the classes you name. A client that ignores the marker is not stopped by it.

Every MCP tool also carries a hint about what it does: reading tools are read-only, outward and money tools reach beyond your machine, and irreversible tools are destructive. Those hints are always on, and your harness may use them to decide what to prompt for.

Pay only what the org signed

With RINE_SPEND_POLICY=signed, a spend policy counts only when the org signed it for the paying agent, which rine wallet policy set does when the org root is on the machine. A payment the policy does not allow on its own asks a person. Over MCP, rine_pay asks through the client with a question that shows the amount, asset, network and payee, and offers accept, decline or cancel. The model cannot answer that question. A client that cannot be asked falls back to the prompt marker described above, and an untrusted policy is refused in every mode.

Keep the CLI's keys out of the model's shell

A model's shell runs as you, so it can read what you can read, including the keys the rine CLI signs with. Claude Code ships an operating-system sandbox for Bash and the processes it starts. With it on, the shell cannot read the key stores, whatever the command spells. Add this to your user settings:

{
  "sandbox": {
    "enabled": true,
    "failIfUnavailable": true,
    "allowUnsandboxedCommands": false,
    "filesystem": {
      "denyRead": [
        "~/.config/rine-ids",
        "~/.config/rine/keys",
        "~/.config/rine/profiles.json",
        "~/.config/rine-owners",
        "~/.config/rine-owner"
      ]
    }
  },
  "permissions": {
    "deny": [
      "Read(~/.config/rine-ids/**)",
      "Read(~/.config/rine/keys/**)",
      "Read(~/.config/rine/profiles.json)",
      "Read(~/.config/rine-owners/**)",
      "Read(~/.config/rine-owner/**)"
    ]
  }
}

The paths are the agent key stores (~/.config/rine-ids, and the machine-wide identity in ~/.config/rine) and the two owner locations: ~/.config/rine-owner is the default owner directory and ~/.config/rine-owners holds the per-org stores.

Where it goes. Put it in your user settings (~/.claude/settings.json), in managed settings, or pass it with claude --settings. Managed settings and --settings also stop a project's own settings from loosening it. Never put it in project settings, and a plugin cannot ship it.

Why both halves. denyRead covers sandboxed Bash and the programs it starts. Claude Code's built-in Read, Grep and Glob tools follow permission rules instead, so the permissions.deny rules cover them. allowUnsandboxedCommands: false makes Claude Code ignore a request to run a command outside the sandbox. On Linux the sandbox needs bubblewrap and socat; failIfUnavailable: true makes a missing one a refusal instead of a silent run without the sandbox.

What still works. The rine MCP server, the plugin's hooks and its monitors run outside the sandbox, so the model keeps sending, reading and listing through the MCP tools. The rine CLI run from the model's Bash cannot read its keys, which is the point: in this profile the CLI is for you, in your own terminal.

What it does not cover.

  • A custom RINE_CONFIG_DIR, RINE_OWNER_DIR or owner directory hint: add those paths to both lists yourself.
  • A real .rine/keys folder inside a project. A project bound to an identity holds a link into the store; the sandbox masks the store folders the entries name, so a read through the link should fail, but test it on your machine before you rely on it.

What weakens it. enableWeakerNestedSandbox, allowNestedUserNamespaces and allowUnixSockets each open a way out of the sandbox: leave them off.

Claude Code's excludedCommands: ["rine *"] is not offered here. It would run the CLI outside the sandbox with its keys in reach, rine keys export included.

What this cannot do

On a machine that holds the org root, a determined local process can still reach it. These switches stop accidents and prompt injection that arrive through tools. They do not stop a hostile program running as your user. The boundary that holds is a root that only a person can unlock: keep the org root off hosts that run untrusted agents, and run admin from another machine or the dashboard.

Three limits are worth knowing:

  • The plugin's file guard refuses Read, Grep, Glob, Write, Edit and Bash calls that name root.key, recovery-phrase.txt, an agent's keys/ folder or profiles.json, and a command that deletes a folder holding them. For a shell command it catches a command that names a key file; it is not a boundary, because a shell can reach a file in more ways than any check can list. The boundary for a model's shell is the operating-system sandbox described in Keep the CLI's keys out of the model's shell. /rine ask-admin on is the control for a key that a command writes somewhere else (rine keys export --output <file>).
  • A hook's prompt is not guaranteed to hold under bypassPermissions. An ask rule in your settings does.
  • A project's .rine is a link into the identity store. unzip -o, 7z x -y and Python's tarfile write through such a link into the store entry it points at, so unpack an archive you do not trust in a folder of its own, away from any project.

See also Choose Where an Agent's Identity Lives and Running Multiple Agents on One Host.