HomeConnectClaude Code

Integration Guide

Claude Code

Connect Claude Code to OSuite and get your first governed action into /decisions in under 20 minutes.

Instance URL detected: https://studio.osuite.ai

Governance context

Runtime class

Local Execution Agent

A local tool-running runtime where the customer can intercept actions directly at the execution boundary.

Recommended surfaces

Runtime Boundary Adapter

Intercept real tool or action execution at the boundary where side effects occur.

Control Plane

Run policy, approvals, replay, and evidence management as the operator system of record.

Typical governance range

Approval-Orchestrated Governance -> Runtime-Enforced Governance

Self-host and future SaaS are deployment model choices for the OSuite control plane. They do not determine governance level by themselves.

1

Deploy OSuite

Get a running instance. Click the Vercel deploy button or run locally.

Already have an instance? Skip to Step 2.

2

Copy hook scripts into your project

OSuite hooks intercept Bash, Edit, Write, and MultiEdit tool calls.

Terminal

mkdir -p .claude/hooks
cp hooks/osuite_pretool.py  .claude/hooks/
cp hooks/osuite_posttool.py .claude/hooks/
3

Set environment variables

Claude Code reads these from the shell or a .env file in the project root.

.env

OSUITE_BASE_URL=https://studio.osuite.ai
OSUITE_API_KEY=<your-workspace-api-key>
OSUITE_HOOK_MODE=enforce
4

Add hooks to Claude Code settings

Merge this into your project's .claude/settings.json (or ~/.claude/settings.json for global).

.claude/settings.json

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash|Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "python .claude/hooks/osuite_pretool.py"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Bash|Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "python .claude/hooks/osuite_posttool.py"
          }
        ]
      }
    ]
  }
}
5

Run Claude Code and trigger a tool call

Ask Claude Code to do anything that uses Bash, Edit, Write, or MultiEdit. The hook fires automatically.

Example prompt

Create a file called hello.txt with the contents "Hello from a governed agent"

Watch the terminal — you should see [OSuite] messages as the hook evaluates the action.

6

See the result in OSuite

Open your OSuite dashboard to confirm the action was recorded.

Go to /decisions — you should see your tool call in the ledger with action_type 'other' (for a simple file write) or 'security' (for sensitive files), status 'completed'.

What success looks like

Go to /decisions — you should see your Claude Code tool call in the ledger. Look for action_type 'other' or 'security' with agent_id 'claude-code' and status 'completed'.

Navigate to /decisions in your OSuite instance. Your action should appear in the ledger within seconds of the agent run.

Governance as Code

Drop a guardrails.yml in your project root to enforce policies without code changes. OSuite evaluates these rules at the guard step before any action executes.

guardrails.yml

version: 1
project: my-claude-code-project
description: >
  Governance policy for Claude Code tool calls.
  Blocks destructive shell commands. Warns on deployment.

policies:
  - id: block_destructive_shell
    description: Block rm -rf and database drops
    applies_to:
      tools:
        - Bash
    rule:
      block: true
    when:
      command_contains:
        - "rm -rf"
        - "drop table"

  - id: warn_on_deploy
    description: Require approval for deployment commands
    applies_to:
      tools:
        - Bash
    rule:
      require: approval
    when:
      command_contains:
        - "git push"
        - "vercel deploy"