Each agent in a multi-agent setup can override the global sandbox and tool policy. This page covers per-agent configuration, precedence rules, and examples.
Sandboxing
Backends and modes — full sandbox reference.
Sandbox vs tool policy vs elevated
Debug “why is this blocked?”
Elevated mode
Elevated exec for trusted senders.
Auth is scoped by agent: each agent has its own agentDir auth store at ~/.openclaw/agents/<agentId>/agent/auth-profiles.json. Never reuse agentDir across agents. Agents can read through to the default/main agent’s auth profiles when they do not have a local profile, but OAuth refresh tokens are not cloned into secondary agent stores. If you copy credentials manually, copy only portable static api_key or token profiles.
agents.list[].sandbox.{docker,browser,prune}.* overrides agents.defaults.sandbox.{docker,browser,prune}.* for that agent (ignored when sandbox scope resolves to "shared").
tools.sandbox.tools or agents.list[].tools.sandbox.tools.
8
Subagent tool policy
tools.subagents.tools, if applicable.
Precedence rules
Each level can further restrict tools, but cannot grant back denied tools from earlier levels.
If agents.list[].tools.sandbox.tools is set, it replaces tools.sandbox.tools for that agent.
If agents.list[].tools.profile is set, it overrides tools.profile for that agent.
Provider tool keys accept either provider (e.g. google-antigravity) or provider/model (e.g. openai/gpt-5.4).
Empty allowlist behavior
If any explicit allowlist in that chain leaves the run with no callable tools, OpenClaw stops before submitting the prompt to the model. This is intentional: an agent configured with a missing tool such as agents.list[].tools.allow: ["query_db"] should fail loudly until the plugin that registers query_db is enabled, not continue as a text-only agent.
Tool policies support group:* shorthands that expand to multiple tools. See Tool groups for the full list.Per-agent elevated overrides (agents.list[].tools.elevated) can further restrict elevated exec for specific agents. See Elevated mode for details.
تُعطّل هذه السياسة أدوات نظام الملفات في OpenClaw، لكن exec يظل Shell ويمكنه كتابة الملفات حيثما يسمح المضيف المحدد أو نظام ملفات صندوق العزل. للحصول على وكيل للقراءة فقط، امنع exec وprocess، أو ادمج الوصول إلى Shell مع عناصر التحكم في نظام ملفات صندوق العزل مثل agents.defaults.sandbox.workspaceAccess: "ro" أو "none".
لا يزال sessions_history في هذا الملف الشخصي يعيد عرض استدعاء محدودًا ومنقحًا بدلًا من تفريغ نصي خام. يزيل استدعاء المساعد وسوم التفكير، وبنية <relevant-memories>، وحمولات XML لاستدعاءات الأدوات بنص عادي (بما في ذلك <tool_call>...</tool_call> و<function_call>...</function_call> و<tool_calls>...</tool_calls> و<function_calls>...</function_calls> وكتل استدعاء الأدوات المقتطعة)، وبنية استدعاءات الأدوات المخفّضة، ورموز تحكم النموذج المسرّبة بنمط ASCII/العرض الكامل، وXML استدعاءات أدوات MiniMax غير الصالح قبل التنقيح/الاقتطاع.
يعتمد agents.defaults.sandbox.mode: "non-main" على session.mainKey (الافتراضي "main")، وليس على معرّف الوكيل. تحصل جلسات المجموعة/القناة دائمًا على مفاتيحها الخاصة، لذلك تُعامل على أنها غير رئيسية وسيُطبّق عليها صندوق العزل. إذا أردت ألا يستخدم وكيل صندوق العزل أبدًا، فاضبط agents.list[].sandbox.mode: "off".