DigestOps

How do you limit what an AI agent can touch?

27 posts, 1 new this week

Playbook

Practitioners limit AI agent access through a combination of system-level sandboxing, specific configuration deny rules, and hardware-level or infrastructure-based isolation.

  1. Restrict file access via Claude Code settings

    Users can prevent Claude Code from editing sensitive files like .zshrc, .bashrc, .gitconfig, and .ssh/** by adding them to a 'deny' list within ~/.claude/settings.json . 2

  2. Isolate agents in Linux sandboxes

    Developers can run agents such as Claude Code, Codex, or Pi in isolated environments like external-sandbox-v86, which uses Alpine Linux via WebAssembly in Node.js 22.19 or later to prevent host system damage . 9

  3. Apply Nix overlays to dependencies

    Geoff uses Nix overlays to patch system dependencies like git (from 2.54 to 2.55 to remove force-push) and OpenSSL across CI, laptops, and sandboxes . 1

  4. Harden agent permissions and production access

    Run agents on disposable NixOS machines with sudo access while strictly forbidding database connections or root access on production hosts . 1

  5. Lock configuration files to prevent rule bypass

    Lock the ESLint config file to prevent agents from inserting eslint-disable-next-line comments to bypass linting rules . 4

  6. Use code-based validation for task completion

    Design agent harnesses where code, rather than the model, judges completion by comparing external world state—such as a page snapshot—before and after an action . 7

Choosing between approaches

While deny rules in ~/.claude/settings.json block built-in tools and shell redirects, they may not stop independent install scripts, which might require enabling the Bash sandbox 2. Sandboxing alone may not prevent two agents on the same vLLM inference server from communicating via kernel selection or KV cache side channels 10.

Not covered yet

The material does not address methods for detecting or preventing the side-channel communication between models sharing an inference engine 10.

Drawn from the top 10 posts for this question; the numbers match the list below · updated 2026-12-02
Type

Posts

17 more posts to see