Repository navigation
Evidence OpenClaw
Evidence for the facts about OpenClaw that the repository states in docs/clients.md. A heading here matches a heading there.
Read at OpenClaw 2026.10.10, commit d48be80a6379, on 2026-11-05.
- Where the links point.
Documentation is the Markdown under
docs/inopenclaw/openclaw, published at docs.openclaw.ai. Every source link is a permalink at commitd48be80a6379, the commitopenclaw --versionof the 2026.10.10 release prints. It is two commits after tagv2026.10.10(7dc3350cb9f0), and the two change onlyscripts/lib/update-compat-inventory.json. The facts added on 2026-11-11 were also read at tagv2026.11.3(847611dcaa3b), where the cited files are unchanged. - How the runs were set up.
The runs were made at OpenClaw 2026.10.10 and 2026.11.1.
A probe plugin and the built plugin loaded through
plugins.load.paths, on a copy of the state folder. The packed tarball of the plugin installed throughnpm-pack:, and commands and chat turns went throughchat.sendover the Gateway WebSocket. CI installs the packed tarball throughnpm-pack:on the OpenClaw release that.github/actions/setup-openclaw/package.jsonpins.
Read at OpenClaw 2026.10.10, commit d48be80a6379; documentation read on 2026-11-05.
- Install from npm only:
npm:specs, bare package names and what an npm spec is. Documentation: Install plugins, Sources and locators, Hook packs and npm specs - A new arbitrary source warns first, and a non-interactive install needs
--force. Documentation: Install plugins, Install, Manage plugins, Install plugins -
--accept-capabilitiesfor non-interactive commands, and the sources that always ask. Documentation: Manage plugins, Capability consent -
plugins installadds the plugin toplugins.allow, enables it and selects its slot, and--no-enable, a missing config andplugins enable. Documentation: Install plugins, Install, Manage plugins, Install plugins - Plugin commands apply through a running Gateway or save for the next start,
inspect --runtime --jsonloads the plugin module, and the install's output. Documentation: Manage plugins, Apply changes and inspect Seen: OpenClaw 2026.11.1, 2026-11-05, thepackagejob'snpm-pack:install printedInstalled plugin: model-router-openclawandSaved for the next Gateway start. -
inspect --runtimeloads the plugin intool-discoverymode, the mode list's wording fortool-discoveryandfull, and what this plugin registers in it. Source:plugins-inspect-command.tsL125–L130,status.tsL284,loader-registration-plan.tsL48–L50,plugin-registration.types.tsL494–L509 Source: this repository'ssrc/adapters/openclaw/index.tsregisters only the tool intool-discoverymode Seen: OpenClaw 2026.10.10,inspect --runtime --jsonof the packed tarball listedtools: ["model_router_config"],hooks: []andcommands: [] - The fields of the
inspect --runtime --jsonreport. Seen: OpenClaw 2026.11.1, 2026-11-05, thepackagejob installed the packed tarball and ranopenclaw plugins inspect model-router-openclaw --runtime --json, andscripts/check-openclaw-install.tsread the report and passed; the report held the plugin id, the package name and the package version, statusloaded,importedandenabledtrue,model_router_configincontracts.toolsand no diagnostics; the script then called the installed bundle'sregister()on a recording API infullmode, and the bundle registered the hook, the config tool and the two option commands - Gateway log lines for registered commands and hooks, the levels they log at, and one line for each command in each plugin load.
Source:
command-registration.tsL377,globals.tsL6–L8,hook-runner-global.tsL22–L27 Seen: OpenClaw 2026.10.10, the probe plugin's registration appeared in the Gateway log asRegistered plugin command: /probescopewhen the Gateway loaded the plugin Seen: OpenClaw 2026.11.1 on 2026-11-21,openclaw gateway run --port <port> --bind loopback --auth token --verbose. The console printed one line for each of the plugin's three commands. It printedRegistered plugin command: /dreaming (plugin: memory-core)twice, once in each of two plugin loads. - The
hybridreload mode replaces the plugin's runtime instance. Documentation: Config hot reload -
plugins install --link, its capability consent and trust, andplugins reload. Documentation: Install plugins, Local paths and bundle formats, Manage plugins, Apply changes and inspect -
plugins install npm-pack:<path.tgz>, its managed npm project path and the tarball's place on the Gateway host. Documentation: Install plugins, Archives, Install,docs/cli/plugins/install.mdSeen: OpenClaw 2026.11.1, withopenclaw plugins install "npm-pack:$TARBALL" --force --accept-capabilitiesandopenclaw plugins inspect model-router-openclaw --runtime --json, 2026-11-05 -
plugins update <id>reuses the tracked install spec. Documentation: Manage plugins, Update plugins -
plugins disable <id>toggles the config entry and keeps the installed files. Documentation: Manage plugins, Enable and disable plugins - The info line when the manifest id differs from the package name, where it reaches the terminal and when it appears nowhere.
Source:
install-installed-package.tsL109–L112,plugins-install-command.tsL65–L69,plugins-mutations.tsL85–L93,plugins-command-helpers.tsL7–L15 Seen: OpenClaw 2026.10.10, annpm-pack:install printed no such line, 2026-11-06 -
openclaw logs --plainand--follow. Documentation:openclaw logs -
openclaw config set. Documentation:openclaw config, Examples - The Control UI settings page of a plugin, at
/settings/plugins/<plugin-id>. Documentation: Manage plugins, Use the Control UI
OpenClaw documentation read on 2026-11-05.
- A native plugin archive needs
openclaw.plugin.json. Documentation: Install plugins, Archives - The required manifest fields
idandconfigSchema, and the optionaluiHintsandskills. Documentation: Plugin manifest, Top-level field reference - Config validation against
configSchema, a rejectedconfig setand a refused Gateway start. Documentation: Plugin manifest, JSON Schema requirements Seen: OpenClaw 2026.11.1 and 2026.10.10, 2026-11-13, the built plugin loaded throughplugins.load.pathson a copy of the configuration; both versions alike;openclaw config set plugins.entries.model-router-openclaw.config.unknown_model x/yexited 1, saved nothing and printedConfig change declined. No settings were saved.andConfig validation failed: plugins.entries.model-router-openclaw.config: invalid config: must not have additional properties: "unknown_model"; with that key written into the config file by hand,openclaw gateway runrefused to start, andopenclaw config validatenamed the same cause and offeredopenclaw doctor --fix -
activation.onStartup. Documentation: Manifest capabilities, activation reference -
contracts.tools. Documentation: Manifest capabilities, contracts reference -
configContracts.secretInputs;openclaw config setstores a plain string on such a path and asks for no SecretRef; a manifest whoseuiHintsmark such a keysensitiveloads. Documentation: Manifest config and secrets, secretInputs paths Seen: OpenClaw 2026.11.1 on 2026-11-21,openclaw config set plugins.entries.<id>.config.<key> <value>with standard input closed, on two keys that the manifest lists underconfigContracts.secretInputsand markssensitiveinuiHints. Each command exited 0 and printedUpdated plugins.entries.<id>.config.<key>. Change will apply without restarting the gateway.openclaw config validateprintedConfig valid, andopenclaw plugins inspect <id> --runtime --jsongave the statusloaded. The run printed no hint, so it shows that the manifest loads and not what the hint does. - The
openclawfields ofpackage.json, and the two that OpenClaw enforces when it installs a non-bundled plugin. Documentation: Plugin package.json, package.json fields that affect discovery - A folder whose
package.jsonnamesopenclaw.extensionsloads as a native package from those entry files, and OpenClaw reads norulesfolder of it. Read at OpenClaw 2026.11.10 (commit6ea542fd97e2) on 2026-11-26. Source:discovery.tsL661–L675; onlysrc/pluginsandsrc/agentswere searched for a reader of arulesfolder Seen: OpenClaw 2026.11.1 on 2026-11-26, a Gateway with a stub model on the loopback interface that recorded each request, and oneopenclaw agent --agent main -m <text> --jsonturn, with the plugin loaded from the unpacked npm package, which holdsrules/model-router-briefs.md, an always-apply rule for omp, and with the conversation grant unset. No request held the rule's text.
Read at OpenClaw 2026.10.10, commit d48be80a6379; documentation read on 2026-11-05.
-
register(api)stays synchronous, and handler priority. Documentation: Hook reference, Registration and execution -
api.onoptionsmatcher,priorityandtimeoutMs. Documentation:reference.mdL34–L44 Documentation: Hook reference, Registration and execution Seen: OpenClaw 2026.10.10, the probe plugin'sregistercalledapi.on("before_tool_call", handler, { matcher: ["sessions_spawn"], priority: 100, timeoutMs: 10000 })and it was accepted - A plain-object default export loads and registers.
Seen: OpenClaw 2026.10.10, a probe plugin loaded through
plugins.load.paths, thenopenclaw plugins inspect <id> --jsonprinted statusloaded - The six values of
api.registrationMode. Source:plugin-registration.types.tsL503–L509 Documentation: Registration mode - The loader calls
register(api)once per load. Source:loader-runtime-candidate.tsL610–L619,loader-registration-plan.tsL39–L64 - The four modes a plugin that is not a channel meets.
Source:
loader-registration-plan.tsL39–L64 - Gateway startup loads plugins in
fullmode. Source:server-plugins.tsL440–L456,server-core-runtime.tsL446–L466 Seen: OpenClaw 2026.10.10, the probe plugin loggedapi.registrationModeon each registration and readfullwhen the Gateway loaded it - A load with
activate: falseand noruntimeSideEffectsruns indiscoverymode and leaves the active registry alone. Source:loader-load-context.tsL229–L231,loader.tsL18–L20 - An agent turn reuses or builds a registry.
Source:
runtime-plugins.tsL308–L330,prepared-model-runtime.inbound-registry.tsL87–L117,loader-runtime-core.tsL85–L114 Seen: OpenClaw 2026.10.10, the probe plugin loggedapi.registrationModeon each registration and registered a second time withdiscoveryafter an agent turn - When a prepared turn borrows from the Gateway registry.
Source:
prepared-model-runtime.inbound-registry.tsL63–L78,loader-runtime-core.tsL105–L113,loader-runtime-core.tsL479 - A borrowed plugin skips
registerin that load, and its tools, hooks and commands are copied into the borrowing registry. Source:loader-runtime-core.tsL539–L549,registry-contributions.tsL38–L99,registry-empty.tsL4–L59 - Chat dispatch reads commands from the current registry.
Source:
plugin-command-registry.tsL6–L14,plugin-command-runtime.tsL189–L197,commands-plugin.tsL43–L47 - A turn's own registry is the request scope for dispatch, and a Gateway chat turn dispatches inside its registry's scope.
Source:
gateway-request-scope.tsL184–L203,runtime-plugins.tsL375–L377,dispatch-from-config.tsL207,dispatch-from-config.gather.tsL535–L547 -
/commandsreads the same registry as chat dispatch. Source:commands.tsL52,runtime.tsL499–L503,gateway-request-scope.tsL291–L299 - An agent run takes a plugin's tools from the registry that holds them, or cold-loads the plugin in
tool-discoverymode. Source:tools.tsL452–L509 - The Gateway's tool replaces a matching discovery-registry tool.
Source:
tool-registry-adoption.tsL9–L50 -
adoptRuntimeToolRegistrationswalks the discovery registry's tools. Source:tool-registry-adoption.tsL20–L52 -
registerTool,registerCommandandonare live in three modes. Source:registry-state.tsL52–L61,registry-api.tsL128–L131 - The same three calls are no-ops in three modes.
Source:
api-builder.tsL15,api-builder.tsL53,api-builder.tsL93 -
api.runtimethrows incli-metadataandsetup-onlymodes. Source:api-builder.tsL97–L117 Documentation: Registration mode - Each load builds its own registry.
Source:
loader-runtime-core.tsL267,registry-state.tsL98 - A duplicate command name is rejected.
Source:
command-registration.tsL355–L365,registry-registrars-operations.tsL449–L452 - A duplicate tool name is dropped at resolution.
Source:
registry-registrars-tools-hooks.tsL276–L292,tools.tsL707–L713 -
registerToolneeds the name incontracts.tools. Source:registry-registrars-tools-hooks.tsL228–L275 - The agent loop validates tool arguments before
execute. Source:agent-loop.tsL1037–L1045,validation.tsL381–L420 - Commands registered in
fullanddiscoverymode, or infullmode only, are listed by/commandsand run through the Gateway. Seen: OpenClaw 2026.10.10, the plugin's npm tarball installed withnpm-pack:, commands sent throughchat.sendover the Gateway WebSocket, 2026-11-06;/commandslisted/model-router-providerand/model-router-scope, and/model-router-scope extendedwroteextendedto the config, after a fresh Gateway start and after an install into the running Gateway; a build that registered the commands infullmode only also listed them - A
sessions_spawnrewrite in a Gateway chat turn. Seen: OpenClaw 2026.10.10, the plugin's npm tarball installed withnpm-pack:, onechat.sendturn over the Gateway WebSocket, 2026-11-06; a turn onopenrouter/openai/gpt-4.1calledsessions_spawnwith a task alone, and the child session ran onopenai/gpt-4.1-minithrough OpenRouter with thinking levelmedium - A prepared generation's hook runner reads its own registry alone.
Source:
agent-command.tsL692–L699,hook-runner-global-state.tsL123–L127,agent-tools.before-tool-call.policy.tsL145–L146,hook-runner-global-state.tsL79–L81,hook-runner-global-state.tsL109–L114 - Activating a registry initialises the global hook runner.
Source:
loader-shared.tsL414–L431 -
api.pluginConfigholds only the plugin's own config, the operator'shookssettings sit inapi.config, andapi.runtime.config.currentexists. Seen: OpenClaw 2026.10.10, the probe plugin printedapi.pluginConfig,api.configand the member names ofapi - A plugin from
plugins.load.pathswithout an install record loads with a trust note and is active; the note is awarndiagnostic that startsOpenClaw can't verify where this plugin came fromand carriesreason=record-missing, inplugins inspect --runtime --jsonand in the Gateway log; what the check that raises the note reads; the plugin's id inplugins.allowsilences the note. Seen: OpenClaw 2026.10.10,openclaw plugins inspectof the probe plugin Read at OpenClaw 2026.11.1 (commit4ffdd2047d19) on 2026-11-21. Source: the text and thewarndiagnostic,loader-provenance.tsL243–L257; what the note reads and theplugins.allowskip,loader-provenance.tsL214–L241; the trust reason, withrecord-missing,installed-plugin-record-match.tsL77–L99; theconfigorigin of aplugins.load.pathsentry,discovery.tsL917–L921; the three files name none ofconfigSchema,uiHintsandconfigContractsSeen: OpenClaw 2026.11.1 on 2026-11-21,openclaw plugins inspect <id> --runtime --jsonandopenclaw gateway run --verbose, with the plugin's folder inplugins.load.pathsand no install record. The inspect report held one diagnostic, of levelwarn, with that text andreason=record-missing, and the Gateway printed the same text. -
openclaw plugins doctorexits 1 on a diagnostic, the trust note included, and passes over the note that an explicit config-selected plugin resolved a duplicate plugin id. Read at OpenClaw 2026.11.1 (commit4ffdd2047d19) on 2026-11-21. Source: the exit rule,plugins-cli.runtime.tsL327–L358; the note it passes over,plugins-cli.runtime.tsL47–L53 Seen: OpenClaw 2026.11.1 on 2026-11-21,openclaw plugins doctorwith the trust note as the one diagnostic. It printed the note underDiagnostics:and exited 1.
Read at OpenClaw main, three commits after 2026.11.1, commit d10d3d9a6427, on 2026-11-25.
- A plugin can ship a setup entry that OpenClaw loads in a pass of its own, and
openclaw.setupEntryinpackage.jsonnames it. Without that field OpenClaw takes a file namedsetup-apiwith one of the extensions.js,.mjs,.cjs,.ts,.mtsor.cts, at the plugin root or in itsdist/folder. Source:setup-registry.tsL55–L66, L190–L194 Documentation:setup-and-auth.mdL228 - The pass builds an
apiinsetup-onlymode whoseruntimeis unavailable, and calls the module'sregister(api). It skips a module whoseregisteris missing or whoseiddiffers from the manifest id. A default export that is a plain object{ id, register(api) }serves. Source:setup-registry.tsL541–L551, L593–L609,module-export.tsL16–L45 -
api.registerConfigMigration(migrate)records the function. The setup pass callsmigrate(cfg)with the whole config and reads{ config, changes }from the result. A result ofnullorundefinedreads as no change. Source:setup-registry.tsL576–L581, L712–L736 Documentation:infrastructure.mdL34 - The pass reads the setup entry of each plugin that has an entry under
plugins.entries. Source:setup-registry.tsL167–L188, L729. The source adds a plugin whose manifestconfigContracts.compatibilityMigrationPathsmatch the config, so the fact holds for entries underplugins.entriesand is not limited to them. -
setup.requiresRuntime: falsein the manifest keeps OpenClaw from executing the setup entry, and an omitted field keeps the entry in use. Source:setup-registry.tsL507–L513 Documentation:setup-and-auth.mdL236, L249 -
setup.configMigrationslists the ids of the migrations that the setup entry owns. Documentation:setup-and-auth.mdL248 - Only
openclaw doctorruns the migrations that setup entries register;openclaw updateruns a freshdoctor --repairwhen a plugin changed, then validates the config in a new process. Source, read at v2026.11.10 on 2026-11-25:runPluginSetupConfigMigrations, called only fromlegacy-config-core-migrate.tsL74–L96, which the doctor config flow calls atdoctor-config-flow.tsL305–L314; the update's fresh doctor atupdate-command-fresh-doctor.tsL585–L591 and L706–L720, its validation atupdate-command-post-plugin-validation.tsL15–L58. -
openclaw plugins update <id>runs no setup-entry migration, and after it replaces the files it runs the config repair of a plugin whose manifest setsdoctorContract.configRepair: true, from itsdoctor-contract-apifile. Source, read at v2026.11.10 on 2026-11-25:plugins-update-command.tsL609–L636,plugin-update-config-migration.tsL29–L126,doctor-contract-artifact.tsL22–L27, manifest surfaces L49–L52. -
openclaw gateway runruns no plugin migration before it validates the config, and an invalid config stops the start. Source, read at v2026.11.10 on 2026-11-25:server-startup-config-helpers.tsL58–L83,gateway-cli/run.tsL113–L131,validation-plugin-config.tsL314–L335.
Read at OpenClaw 2026.10.10, commit d48be80a6379; documentation read on 2026-11-05.
-
before_prompt_buildreceives a context withsessionKeyand may returnappendSystemContext; OpenClaw refuses the registration of a non-bundled plugin, with a warning, unlessplugins.entries.<id>.hooks.allowConversationAccessistrue; it also refuses it when the prompt-change key isfalse, a key namedallowPromptModificationandallowPromptInjectionin older releases; and a throw in a handler is logged and skipped. Read at OpenClaw 2026.10.10 (commit7dc3350cb9f0) and 2026.11.10 (commit6ea542fd97e2) on 2026-11-26. Source for the context and result at 2026.10.10:hook-before-agent-start.types.tsL22–L51,hook-agent-context.types.tsL26–L31; at 2026.11.10:hook-before-agent-start.types.tsL37–L73 Source for the conversation grant at 2026.10.10:hook-policy-decisions.tsL10–L17,registry-registrars-tools-hooks.tsL403–L418; at 2026.11.10:registry-registrars.tsL652–L667,hook-types.tsL126–L130 Source for the prompt-change key at 2026.10.10:hook-policy-decisions.tsL6–L8,registry-registrars-tools-hooks.tsL396–L402; at 2026.11.10:registry-registrars.tsL645–L651,hooks.mdL135–L138 Source for a throwing handler at 2026.10.10:hooks.tsL247–L267; at 2026.11.10:hooks.tsL172–L191 - The text a
before_prompt_buildhandler returns inappendSystemContextgoes once into the system prompt of each request of that session, in a block headed "OpenClaw plugin-injected system context. This block is not workspace file content." Seen: OpenClaw 2026.11.1 on 2026-11-26, a Gateway with a stub model on the loopback interface that recorded each request, oneopenclaw agent --agent main -m <text> --jsonturn and onesessions_spawnthroughPOST /tools/invoke. Each request of the main session held the text once in its system message under that heading. - A session is a spawned child, or an ACP session, when its key, lower-cased, starts with
subagent:oracp:, at the start of the key or afteragent:<id>:; a spawned child's key readsagent:<id>:subagent:<uuid>, and an ACP session's readsagent:<id>:acp:<uuid>. Read at OpenClaw 2026.10.10 (commit7dc3350cb9f0) and 2026.11.10 (commit6ea542fd97e2) on 2026-11-26. Source for the two prefix tests at 2026.11.10:session-key-utils.tsL101–L135 Source for the key shapes at 2026.10.10:spawn-plan.tsL60–L66; at 2026.11.10:spawn-plan.tsL59–L65 - The
before_tool_callevent, context and results, the requester inctx.agentIdand the keys ofevent.params. Documentation: Tool call policy hooks, Tool call policy Seen: OpenClaw 2026.10.10,POST /tools/invokewithsessions_spawn, aftergateway.tools.allownamed it; the handler saw event keystoolName,paramsandtoolCallId, and context keystoolName,agentId,sessionKey,abortSignalandtoolCallId;ctx.agentIdwas the requester,ctx.abortSignalwas anAbortSignal, andparamsheld only the keys the caller passed - A returned
paramsrewrites the tool parameters. Documentation:tool-policy.mdL68–L70 Documentation: Tool call policy hooks, Tool call policy - Native Codex tools reject parameter rewrites, and a handler's matcher keeps a
sessions_spawnhandler from seeingspawn_agent. Source:native-hook-relay-codec.tsL15–L20,native-hook-relay-events.tsL195–L203,hooks.tsL218–L222 Documentation:tool-policy.mdL74–L76 Documentation: Tool call policy hooks, Tool call policy -
subagent_spawningis removed, andsubagent_spawnedremains and only observes. Source:hook-types.tsL124–L127,registry-records.tsL318–L335 Documentation:removed-surfaces.mdL242–L265 - Swarm's
agents.runpasses through the hook with the swarm keys, and a returnedparamsapplies. Source:code-mode-swarm.runtime.tsL109–L116, L189–L192,tool-search-catalog.tsL156–L160 -
hooks.timeoutsprecedence overhooks.timeoutMsand the plugin'stimeoutMs, and the 600000 ms limit. Documentation:reference.mdL53–L76 Documentation: Hook reference, Registration and execution Seen: OpenClaw 2026.10.10,POST /tools/invokewithsessions_spawn, aftergateway.tools.allownamed it; the operator's per-hook timeout of 12 s beat the plugin's 10 s and the all-hooks value of 20 s, and a handler that slept 11 s, over the plugin's own 10 s, finished and blocked by its own result -
before_tool_calldefault timeout and fail-closed, and the403answer for a timeout. Source:hook-runner-global.tsL40–L44,hooks.tsL497–L507 Documentation:reference.mdL93 Documentation: Hook reference, Registration and execution Seen: OpenClaw 2026.10.10,POST /tools/invokewithsessions_spawn, aftergateway.tools.allownamed it; a handler that slept 13 s under the operator's 12 s timeout got403 Tool call blocked because before_tool_call hook failed, and the log readtimed out after 12000ms - A hook timeout does not abort the handler. Documentation: Hook reference, Registration and execution
-
ctx.abortSignalaborts only on cancellation. Source:hook-types.tsL531 Documentation:reference.mdL78–L80 -
api.loggeris bound once. Source:registry-api.tsL120–L125,api-builder.tsL143 - The hook wraps the tool, and loopback MCP calls run it, a Claude CLI backend caller's included.
Source:
agent-tools.before-tool-call.wrapper.tsL253,mcp-http.handlers.tsL170–L197 Seen: OpenClaw 2026.10.10, one agent turn on theclaude-clibackend, read from the Gateway log and the child transcript; the hook fired for the loopback MCP call, with event keystoolName,params,runIdandtoolCallId; the result,resolvedModeland the child's transcript matched the embedded-runtime run; the run showed no login, logout, expiry or credential message -
before_tool_callreceives the arguments the tool reads next. Source:agent-tools.before-tool-call.wrapper.tsL393–L424, L446–L452, L483–L492,agent-tools.before-tool-call.policy.tsL265, L300–L313 Source:sessions-spawn-tool.tsholds noprepareBeforeToolCallParams, whichcommon.tsL42 declares as an optional tool member Seen: OpenClaw 2026.10.10,POST /tools/invokewithsessions_spawnon a copy of the state folder, 2026-11-11; with the hook timeout at 3000 ms the plugin's routing limit was 1000 ms, and the Jev request went through a proxy that accepted the connection and never answered; the spawn ran unchanged, and the child's first model request came about 1 s after the routing limit, on the caller's model, a local stub that refused connections - How
sessions_spawnreads its parameters. Source:sessions-spawn-tool.tsL432, L440–L441, L459, L470–L471,common.tsL96–L123,param-key.tsL4–L31 - A
{ params: { model, thinking } }rewrite on a real spawn. Seen: OpenClaw 2026.10.10,POST /tools/invokewithsessions_spawn, then the child's transcript; the result readstatus: accepted, the routed model,modelApplied: trueandmode: run; the transcript held amodel_changeto the routed model and athinking_level_changeto the routed level; the caller's session read thinkingoffand the child's read the routed level, with reasoning tokens in its reply - A native sub-agent inherits model and thinking.
Documentation: Sub-agent tool reference, Tool:
sessions_spawn - The parameters of
sessions_spawn. Documentation: Sub-agent tool reference, Tool parameters - A visible session and the thinking override.
Documentation:
tool-reference.mdL266 Documentation: Sub-agent tool reference, Tool parameters - Invalid and unsupported
thinkinglevels, the clamp notice, andresolveThinkingPolicy. Source:subagent-spawn-thinking.tsL24–L30,subagent-spawn-plan.tsL78–L87,thinking.tsL421–L441,thinking.shared.tsL61–L83 Seen: OpenClaw 2026.10.10, the probe plugin listedresolveThinkingPolicyamong the members ofapi.runtime.agent - Native subagent model selections keep their precedence. Documentation: Model failover, Selection source policy
-
outputSchemaandcollect. Source:sessions-spawn-tool.tsL243–L247, L402–L404 Documentation: Swarm -
sandbox: "require"and CLI backends. Documentation: Sub-agent tool reference,sandbox, CLI backends
Read at OpenClaw 2026.10.10, commit d48be80a6379; documentation read on 2026-11-05.
-
requiredScopes,senderIsOwnerand the admin scopeoperator.admin. Source:command-registry-state.tsL26–L31,operator-scopes.tsL1 - An admin client and a read/write client on a scoped command.
Seen: OpenClaw 2026.10.10, a probe command with
requiredScopes: ["operator.admin"], called throughchat.sendover the Gateway WebSocket - A channel message carries no gateway scopes.
Source:
templating.tsL381–L382,gateway-client-identity.tsL160,commands-context.tsL27 - The check for a command with
requiredScopes. Source:plugin-command-execution.tsL162–L174, L193–L194, L272–L275 - A Gateway client with
operator.adminis an owner. Source:gateway-client-identity.tsL148, L160,command-auth.tsL489–L500,commands-context.tsL75,plugin-command-execution.tsL166–L170, L193–L194 - Agent id normalisation and lookup.
Source:
agent-id.tsL3–L30,agent-scope-config.tsL317–L349,agent-roster.tsL84–L99 - Control UI changes need
operator.admin. Documentation: Manage plugins, Use the Control UI
Read at OpenClaw 2026.10.10, commit d48be80a6379; documentation read on 2026-11-05.
- The Gateway runs on Bun, and
fetchand theAbortSignalhelpers exist in a plugin's handlers. Seen: OpenClaw 2026.10.10, the probe plugin's handlers printedtypeofof each and fetchedhttps://api.typesafe.ai/ - A config write replaces the plugin's runtime instance after a drain, the log lines it writes, and the authority error.
Source:
server-plugin-reload-cleanup.tsL30, L107–L110, L332–L335,server-plugin-reload.tsL404,http-request-authority.tsL143–L148 Seen: OpenClaw 2026.10.10, a command write at 11:25:22 left a spawn at 11:25:30 under the old scope, and the replacement applied at 11:25:43; three runs showed about 9 s; a spawn that overlapped the replacement could fail withGateway requester authority changed, 2026-11-06 - The methods of
api.logger. Documentation: Plugin SDK overview, Registration API -
logging.filesets the path of the Gateway's file log, and without it the file log sits in OpenClaw's own temp folder, outside the home folder. Read at OpenClaw 2026.11.1 (commit4ffdd2047d19) on 2026-11-21. Source: the configured path before the default,logger.tsL469–L470; the default folder,logger.tsL42, which is the shared temp root or a user-scoped one,tmp-openclaw-dir.tsL3–L4 and L55–L61 Seen: OpenClaw 2026.11.1 on 2026-11-21,openclaw config set logging.file <home>/gateway-file.log. It exited 0 and printedUpdated logging.file. No gateway restart needed.The run printed no log path, so it shows that the setting is taken and not where the log was written. - Five environment variables, each set to
1, switch a part of the Gateway off:OPENCLAW_DISABLE_BONJOURthe Bonjour advertiser and local discovery,OPENCLAW_NO_RESPAWNthe respawn of the process at start and for a restart,OPENCLAW_SKIP_CHANNELSthe start of the channels,OPENCLAW_SKIP_CRONcron, andOPENCLAW_NO_AUTO_UPDATEthe update check at start;OPENCLAW_SKIP_CRONtakes1alone, and the other four taketrue,yesandontoo. Read at OpenClaw 2026.11.1 (commit4ffdd2047d19) on 2026-11-21. Source: Bonjour,advertiser.tsL76–L83 andserver-discovery-runtime.tsL118–L122; the respawn,process-respawn.tsL38–L41 andentry.respawn.tsL94–L98; the channels,server-sidecar-startup-mode.tsL6–L12 andserver-startup-post-attach.tsL256–L261; cron, with the comparison to1,server-cron.tsL162–L163; the update check,update-startup.tsL310–L311; the values the other four take,env.tsL65–L68 andboolean.tsL17–L18 Seen: OpenClaw 2026.11.1 on 2026-11-21,openclaw gateway runwith the five variables set to1. The Gateway started, loaded its plugins and exited 0 when the run stopped it; the run printed nothing on what each variable switched off. - The workspace
.envis a lower-trust source, andOPENROUTER_API_KEY,OPENAI_API_KEY,GEMINI_API_KEYandPERPLEXITY_API_KEYare on the static list that OpenClaw drops from it. Source:dotenv.tsL21–L78, L238–L247; the static list, read at OpenClaw commit1b06bd7b898eon 2026-11-25,dotenv.tsL21–L108, wherePERPLEXITY_API_KEYstands at L79. Documentation: Environment variables, Provider credentials and workspace.env -
secretInputsvalues reach the plugin resolved. Documentation: Manifest config and secrets, secretInputs paths,docs/plugins/manifest/config-and-secrets.mdL71, which says "plugins receive resolved values with defaults selected from the source config"
Read at OpenClaw 2026.11.3, commit 847611dcaa3b.
- The tool is
ask_user, labelled "Ask User". Source:ask-user-tool.tsL468–L473 - The shape of an
ask_usercall. Documentation:ask-user.mdL147–L163, L70–L71 - Only the main session gets
ask_user, andtools.denyremoves it. Source:openclaw-tools.registration.tsL136–L149 Documentation:ask-user.mdL15–L16 - The surfaces that show the prompt, and the text fallback of a prompt with several questions on messaging channels.
Documentation:
ask-user.mdL22–L48 - WhatsApp, Signal and iMessage lack
ask_user. Documentation:whatsapp.mdL243–L244,signal.mdL433–L434,rich-messages.mdL121–L122 Read atmaincommit8e6768f91235.
Read at OpenClaw 2026.11.5 on 2026-11-19.
- Skills are read from
<workspace>/skillsand<workspace>/.agents/skills, with no walk into parent folders. Source:workspace-skill-roots.tsL38–L49 Documentation:skills.mdL41–L42 -
OPENCLAW_HOME,OPENCLAW_STATE_DIRandOPENCLAW_CONFIG_PATH. Documentation:environment.mdL39–L41 -
openclaw gateway runstarts the Gateway, when it refuses to start, and a Gateway with no model configured starts and loads its plugins. Documentation:running.mdL16–L17, L82–L84 Seen: OpenClaw 2026.11.1 on 2026-11-21,openclaw gateway run --port <port> --bind loopback --auth token --verbose, on a config withgateway.modelocaland no model. The console printedhttp server listeningwith 16 plugins, the checkout's plugin among them, and the process exited 0 when the run stopped it. -
openclaw gateway run --bind <mode>stands in forgateway.bindin that run and--auth <mode>forgateway.auth.mode, and neither writes the config file; the values each takes; the Gateway takes its token fromgateway.auth.token, and fromOPENCLAW_GATEWAY_TOKENwhen the config holds none. Read at OpenClaw 2026.11.1 (commit4ffdd2047d19) on 2026-11-21. Source: the two options and their values,run-command.tsL60–L68,run.tsL107–L112 and L541–L544; the flag before the config for the bind,run.tsL672, and for the auth mode,auth-resolve.tsL64; the config's token before the variable,auth-resolve.tsL110–L116 andcredentials.tsL76–L77 Seen: OpenClaw 2026.11.1 on 2026-11-21,openclaw gateway run --port <port> --bind loopback --auth token --verbosewith the token inOPENCLAW_GATEWAY_TOKENand none in the config. The Gateway started and loaded its plugins. -
POST /tools/invoke: its body, its authorization, the default deny list and the answer for a denied tool. Documentation:tools-invoke-http-api.mdL21–L28, L53–L71, L85, L104, L112–L125 -
SIGINTorSIGTERMstops the Gateway process, and a wrapper that forwards no signal leaves it serving. Documentation:running.mdL39–L40
Read at OpenClaw 2026.10.10, commit d48be80a6379; documentation read on 2026-11-05.
- The documentation disagrees on updates: one page says they need a stopped Gateway, another says an update refreshes a running one. Documentation: update page, manage page
- The hook runs only when a tool call runs, other paths may exist, and the meeting bot's realtime consult runs an agent under a sub-agent session key without the tool.
Source:
agent-consult.tsL92–L121 Source: this repository'splugins/model-router-openclaw/README.md, section "Paths the hook never sees" - Whether
before_prompt_buildruns for an ACP session. No read or run settled it. An ACP session's key has nosubagent:segment. - The workspace
.envlist in the source leaves out the variables that an installed provider plugin adds, and OpenClaw may dropTYPESAFE_API_KEYwhen such a plugin declares it. Source:dotenv.ts, as linked in the workspace.envitem of the runtime section; the read of that list left out the variables an installed provider plugin adds -
before_model_resolvereplaces a run's model, provider and fallback chain, receives only the prompt and attachment metadata, holds no thinking level in its result, runs at the start of every embedded agent run, and shows a sub-agent run only inctx.sessionKey. Source:hook-before-agent-start.types.tsL1–L20,run-entry-model-selection.tsL17–L63,setup.tsL82–L137,spawn-plan.tsL60–L66,hook-agent-context.types.tsL26–L67 - No run has installed the package from the registry through
npm:, so thenpm:install command rests on documentation. CI installs the packed tarball throughnpm-pack:, and the probes loaded the plugin throughplugins.load.paths. - The
packagejob's log holds the check's verdict, not the JSON of theinspect --runtimereport. - No run settled which of the two update pages is right.
- No source read lists every path that starts an agent session without the tool that the hook runs on.
- No run covers a sandboxed child with a CLI-backend model, or an
outputSchemaspawn on a model without tools; the sandbox rule for CLI backends and the collector child's need for tools rest on documentation. - No run has checked a SecretRef value reaching the plugin.
- No run has shown the
skipped, cancelledline; it rests on thectx.abortSignalsource and the unit tests. - No run has shown that a command added beside the plugin's two is dispatched, listed or scope-checked.