skip to content

When one OpenClaw Gateway serves a small, mutually trusting team, how should you govern its bootstrap files — shared rules, personal USER.md files, review and secrets?

level: principalimportance: nice to knowfreq 3%

answer

  1. one trust boundary per Gateway
  2. shared root, personal overlay
  3. a per-profile path in the workspace
  4. selection, not secrecy
  5. review rules like code

basics

~20 s

Treat AGENTS.md and SOUL.md as shared, reviewed team policy in a private repo; give each person a personal USER.md that overlays the shared one; keep secrets out. Personal files select prompt context but do not hide data, so separate untrusted people onto separate Gateways.

solid answer

~40 s

An OpenClaw Gateway is one trust boundary, so the files serve a team that already trusts each other. `AGENTS.md`, `SOUL.md` and `IDENTITY.md` are shared and shape every run: version them in a private repo, review changes and name owners. Since 2026.9.6, a Gateway with two or more person profiles can load a personal `users/<canonical-profile-id>/USER.md` after the shared one, chosen by the session's human owner or creator; it overrides user preferences, not project rules, and is omitted if it exceeds the 4,000-character budget. These files are prompt selection, not secrecy: tools and shared transcripts can still expose them. So keep secrets out, enforce limits in tool policy and the sandbox, and give anyone needing privacy their own Gateway.

go deeper

for a junior

Know that a team shares one set of rules and persona files, and that personal preference files are not a privacy feature.

for a middle

Explain where personal USER.md files live, which one a session loads, and why an oversized one is dropped rather than truncated.

for a senior

Show that enforcement sits in tool policy, the sandbox and session visibility, and that shared rule files need review because every run reads them.

for a principal

Own the trade-off between one shared assistant and separate Gateways: convenience and lower running cost against real separation, decided by who trusts whom and what data is at stake.

## The boundary you are deciding inside OpenClaw supports **one trust boundary per Gateway**: a single operator or a **mutually trusting team**. One Gateway shared by mutually untrusted users is explicitly not supported, and anyone who can edit `~/.openclaw` counts as an operator. Every decision about the workspace files on a team install sits inside that boundary. The files can make the assistant behave well for each person; they cannot keep people apart. That gives a lead three levers for the bootstrap files: what is **shared**, what is **personal**, and how both are **reviewed**. ## Shared files: rules, voice and identity `AGENTS.md`, `SOUL.md` and `IDENTITY.md` are read from the agent's configured workspace and injected for everyone who talks to that agent. - Treat `AGENTS.md` as team operating policy: red lines, confirmation habits, standing orders, the `## Tools` notes. It shapes every run, so a careless edit changes behaviour for the whole team. - Keep `SOUL.md` to voice. A tone change should never require touching operating rules, and vice versa. - Keep both in the private workspace repository, change them through reviewed commits, and name an owner for each. - Remember the budgets: each file is injected on every run under per-file and total character limits, so growth has a standing cost. ## Personal USER.md files Since the 2026.9.6 release, a Gateway with at least two distinct, unmerged person profiles can give each person a **personal `USER.md`** at `users/<canonical-profile-id>/USER.md` in the agent workspace, next to the shared root `USER.md`. - People edit their own file in **Settings → Profile → Personal instructions**, or by asking the agent, whose `personal_instructions` tool writes only the requesting person's file. - For eligible external chat turns, the shared file loads first and **one** personal file second: the assigned human owner's, otherwise the authenticated human creator's. Other participants steering the session do not switch it. - The personal file overrides conflicting shared **user preferences**, not project rules or security policy. - It must fit **whole** inside the 4,000-character `USER.md` budget; an oversized personal file is **omitted with a warning** and the shared defaults are used, rather than cut mid-directive. - Per-person selection works on the local embedded, generic CLI and native Codex paths; ACP agents, realtime sessions and remote workers do not gain it. ## What these files cannot do The documentation is blunt: personal files are **prompt selection, not filesystem secrecy**. Workspace tools, trusted plugins, shared transcripts and earlier replies can still expose another person's context, and reassigning a session does not erase its history. So: 1. Never put secrets in any `USER.md`. 2. Enforce limits where OpenClaw enforces them: tool policy, exec approvals, sandboxing, session visibility settings and channel allowlists, not prose in `AGENTS.md`. 3. If two people should not see each other's data, they do not belong on the same Gateway. Note also that a session's personal context is decided by who owns it, not who is typing. Reassigning the session changes the personal file on the next new turn, not the running one, and queued or collected messages from several people keep the session's selection. ## The options a lead weighs | Option | Gains | Costs | |---|---|---| | One shared `USER.md` | simplest; one file to review | preferences collide; one person's habits steer everyone | | Shared defaults plus personal files | individual tone and habits inside one boundary | more files; a false sense of privacy if misexplained | | Separate Gateways per person or group | real separation of state and credentials | more hosts, configs and upgrades to run | ## A workable policy 1. Write down that the Gateway is one trust boundary, and who is inside it. 2. Version shared files in a private repository with review; keep secrets out of the workspace entirely. 3. Use personal `USER.md` files for preferences only, kept short and written as dated directives. 4. Have people sign in individually; a shared owner login edits the shared owner profile's file, not each person's. 5. Move anyone whose data must stay private, or whom the team does not fully trust, to a separate Gateway. There is no single right answer here. A household might live happily with one shared file; a team with clients' data should probably run separate Gateways. The judgement is how much convenience the group gains by sharing one assistant against how much each person must accept the others might see.

  • What happens when someone's personal USER.md grows past the budget?
    It is omitted with a warning and that session uses the shared defaults only. Personal files are treated as indivisible so a cut-off directive never becomes new policy; the shared root `USER.md`, by contrast, is truncated under the normal limits. The fix is to trim superseded entries and move durable facts to memory.
  • When is a personal USER.md the wrong tool and a separate Gateway the right one?
    When people are not mutually trusting, or one person's data must not be visible to another. OpenClaw does not support one Gateway for mutually untrusted users, and personal files only choose which preferences reach the prompt; workspace tools, plugins and shared transcripts can still expose context.

  • Personal USER.md files keep one teammate's data hidden from the others.
  • A personal USER.md can override AGENTS.md project rules and security policy.
  • One Gateway is safe for mutually untrusted users if each has a USER.md.
  • An oversized personal USER.md is cut down to its first 4,000 characters.
  • Whoever sent the latest message decides which personal USER.md loads.

Assumes OpenClaw 2026.9.9; personal USER.md files arrived in 2026.9.6 and their Profile settings editor in 2026.9.7.