C6 · The vault and the graph · Interactive, in your browser
Permissions and privacy
What an agent may read or write, by folder: a note that asks, a rule that decides, a hook, the sandbox, and what must never be in a vault an agent can reach.
An agent can only leak what it can read.
The note: Private/Supplier portal login.md. It is invented, and it should never have been in the vault.
A request, written down. The agent reads it with the rest of the vault.
What the firm has set up
- Rules/Never repeat a login.md: a rule written in plain words
Reads of the note stopped: 0 of 4.
Nothing in the setup stops it: 5
Assumed: a session where edits and shell commands are already approved, so no prompt stands in the way. In Manual mode the docs say edits and most other shell commands prompt anyway; a read-only command such as cat or grep never does.
What the agent tries (5 attempts)
- Opens the private note with its file-reading toolNothing in the setup stops it
Tool: Read
Nothing enforces it. Claude Code’s docs call memory files context, not enforced configuration, so the read happens and what the agent does next is up to the model. A file read inside the working directory needs no approval.
- Runs cat on the private note in a shell commandNothing in the setup stops it
Tool: Bash
Nothing enforces it; the note is only context. The docs list cat among the read-only commands that run without a prompt in every mode.
- Searches the whole vault for the word login from a shell, without naming the noteNothing in the setup stops it
Tool: Bash
Nothing enforces it; the note is only context. grep is a read-only command and runs without a prompt in every mode.
- Writes a short script that opens the private note itselfNothing in the setup stops it
Tool: Bash
Nothing enforces it; the note is only context. Under the assumed session nothing prompts; in Manual mode a script like this would.
- Edits a note in Rules with its file-editing toolNothing in the setup stops it
Tool: Edit
Nothing enforces it. A note that says “ask first” is a request. Under the assumed session nothing prompts; in Manual mode an edit would.
Scripted from the Claude Code pages listed under Sources. No rule runs here, no model is called and nothing leaves the page.
Chapter 3 left two things out of the vault on purpose, a gate code and a supplier’s portal login. Suppose an invented note, “Supplier portal login”, had ended up in a Private folder anyway. The figure lists five things the agent might try and five ways the firm might have protected the note. Pick a protection and see what it stops; four of the attempts are reads of the note, and one is an edit to a rule. Every verdict assumes a session where edits and shell commands are already approved, so no prompt stands in the way.
My viewThe idea of this chapter: an agent can only leak what it can read, so the question is what stands between the agent and the file. The answers differ in kind. One is a request, one is a rule a program checks, one is a script you write, one is a boundary the operating system holds, and one is the file not being there.
The first is the note. Claude Code’s docs say its memory files are loaded at the start of every session and that Claude treats them as context, not enforced configuration. To block an action whatever Claude decides, the same page points to a PreToolUse hook, and it says a hook runs at a fixed point and applies regardless of what Claude decides. The permissions page puts it the same way: permission rules are enforced by Claude Code, not by the model.
My viewTo my eye, then, a note that says “never repeat a login” asks; it does not stop anything. That is the rest of this chapter in one line.
The second is a permission rule. The docs describe allow, ask and deny rules, checked deny first, then ask, then allow. A deny rule on a path such as the private folder blocks Claude’s built-in file tools from reading it, and the docs say it also covers file commands Claude Code recognises in a shell command, like cat. They say it does not cover a command that reads files without naming them, such as a recursive search from the folder that holds the note, or a script that opens files itself. For the search tools the docs say Claude makes a best-effort attempt to apply read rules. A read-only command such as cat or grep runs without a prompt in every mode; in Manual mode an edit, and most other shell commands, prompt.
An ask rule prompts for confirmation every time, and the docs say edit rules apply to all the built-in tools that edit files. Chapter 3 sent writes to rules, decisions, procedures to a person.
My viewTo my eye, a rule per folder is the same reviewer written into the agent’s settings, where the program enforces it instead of the figure.
The third is a hook. The hooks reference describes hooks as handlers that run at points in Claude Code’s lifecycle and are given JSON about the event; for a shell command, that includes the command to be run. A PreToolUse hook runs before a tool call and can block it; its exit code 2 blocks the call, and a hook that returns nothing has made no decision, so the normal permission flow carries on. The same page says a hook that times out, crashes, cannot start or prints invalid JSON does not block unless you set onFailure to block, so a stalled or broken hook is not a gate. The permissions page says a hook cannot override a deny rule, and that a hook is the way to look at a whole command with your own logic. It also says an installed mod can approve a call a deny rule refuses, unless managed settings or a Team or Enterprise login apply.
The fourth is the sandbox. The docs describe it as an operating-system boundary around shell commands and the processes they start, which holds whatever command the model chose to run. They say it does not cover Claude’s file tools, which follow permission rules instead, and that Read and Edit deny rules are merged into the sandbox’s configuration; the page does not spell out how a path in a rule becomes a sandbox setting. It is off by default. If it cannot start, Claude Code runs commands without it unless failIfUnavailable is set. And when a command fails inside it, Claude can retry that command outside the sandbox, which a matching allow rule approves, unless allowUnsandboxedCommands is false. Commands that match excludedCommands run outside it too. The docs’ own limitations section says sandboxing reduces risk but is not a complete isolation boundary. The permissions page calls the two layers complementary.
My viewThe fifth protection is of a different kind. If the note is not in the vault, there is nothing for any of the others to guard. It protects the login, not the rules around it.
My viewThe figure reads from those pages, and the sandbox verdicts hold only for the setup shown: allowUnsandboxedCommands false, with the sandbox started. Reading the tallies: with the permission rule alone, two of four reads of the note are stopped; with the sandbox and the retry switched off, four; with the note not there, four. The verdicts are written by me from the docs, and the check on them tests that each is consistent with its setup, not that Claude Code behaves that way.
My viewChapter 3 says a secret does not belong in the vault: anything an agent can read it can repeat. The rules here are partial, and the docs say so, which is another reason to keep the secret out.
My viewThis chapter draws one agent’s rules by folder. How several agents in one graph each get their own is for the chapter about the vault inside a graph, which is not written yet, so this page does not claim to settle it. The verdicts follow the pages I read on the date shown, and those pages change with the program, so test a rule yourself before you rely on it, with a file that holds nothing real. Nothing in the figure runs a rule or calls a model; the answers are scripted from the docs.
Exercise
Find what your vault would leak.
- Open a vault you use and list, folder by folder, what an agent could read there. Is there anything in it you would not want repeated to a stranger?
- For the worst item, pick the protection in the figure that would stop each of the attempts. Where does it leave a gap, and what would you do about the gap?
- Write down which of your notes an agent should be able to edit without asking, which should ask a person first, and which it should never touch.
Sources
Claude Code docs How Claude remembers your project. Official documentation; read 2026-11-01.
CLAUDE.md files, when they are loaded, @path imports, that they are context rather than enforced configuration (a PreToolUse hook blocks an action regardless of what Claude decides; hooks run at fixed lifecycle events and apply whatever Claude decides), and auto memory: notes Claude writes itself as plain markdown files you can edit or delete.
- Memory is context, not enforced configuration; a PreToolUse hook blocks an action regardless; hooks apply whatever Claude decides
Claude Code docs Configure permissions. Official documentation; read 2026-11-01.
Allow, ask and deny rules and their order (deny first); Read and Edit path rules and what they do and do not cover (built-in file tools, recognised Bash file commands, best-effort for search tools, not a command that reads without naming the file or a script that opens files itself); that a hook cannot override a deny rule; that a Bash rule is not a security boundary; the default Manual mode (edits and most shell commands prompt; read-only commands such as cat and grep never do); permissions and the sandbox as complementary layers; and that an installed mod can approve a call a deny rule refuses unless managed settings or a Team or Enterprise login apply.
- Permission rules are enforced by Claude Code, not by the model; instructions in CLAUDE.md shape what Claude tries to do
- Deny, ask, allow and their order; Read deny rules and the built-in file tools; recognised Bash file commands such as cat; not a command that reads without naming the file or a script that opens files itself; best-effort for search tools; read-only commands run without a prompt in every mode; Manual mode prompts for edits and most shell commands
- Ask rules prompt for confirmation; edit rules apply to all built-in tools that edit files; rules come from settings files
- Hook decisions do not bypass permission rules; a hook inspects the full command text with your own logic; an installed mod can approve a call a deny rule refuses unless managed settings or a Team or Enterprise login apply
- Permissions and sandboxing are complementary layers
- What deny and ask rules cover and do not cover
Claude Code docs Hooks reference. Official documentation; read 2026-11-01.
What hooks are (handlers that run at points in the lifecycle and receive JSON about the event), that a PreToolUse hook runs before a tool call and can block it, the allow, deny, ask and defer decisions, exit code 2 blocking, that silence is not approval, and that a stalled hook is not a gate unless configured to block. Also: a hook that crashes, cannot start or prints invalid JSON lets the action go ahead unless onFailure is set to block. The page is a long reference for every event; I read the PreToolUse, decision, exit-code, failure and timeout sections and searched the rest for the failure rules.
- Hooks receive JSON about the event, with the Bash command; PreToolUse runs before a tool call and can block it; exit code 2 blocks; no output is no decision; a timed-out, crashing, unstartable or invalid-JSON hook does not block unless onFailure is block
- PreToolUse hooks can block a tool call
Claude Code docs Configure the sandboxed Bash tool. Official documentation; read 2026-11-01.
The sandbox as an operating-system boundary around shell commands and the processes they start, that it does not cover the built-in file tools, that permission rules and sandbox settings are merged, that it is off by default and can fail open unless failIfUnavailable is set, the unsandboxed retry (dangerouslyDisableSandbox) and allowUnsandboxedCommands: false, excludedCommands, and the Limitations section (sandboxing reduces risk but is not a complete isolation boundary).
- An operating-system boundary around shell commands and their processes; file tools follow permission rules; Read and Edit deny rules merged into the sandbox configuration; off by default; runs unsandboxed if it cannot start unless failIfUnavailable; the unsandboxed retry and allowUnsandboxedCommands false; excludedCommands; reduces risk but not a complete isolation boundary
- The sandbox’s boundary around shell commands, and its limitations
Each fact about Obsidian or Claude Code is paraphrased from the page named, read on the date shown. Where a sentence is my own reading, it is marked “My view”. The business, its people and its notes are invented.
