Repository navigation
fix(agents): keep empty tool allowlists allow-all when merging alsoAllow - #8
Merged
Merged
Conversation
mergeAlsoAllowPolicy appended names to an empty allow list, turning "allow everything not denied" into an allowlist of only the appended names. Default-on Tool Search (2026.9.7) appends its three control tools to every policy layer, so a config with `tools.allow: []` left embedded runs (all Ollama models, including heartbeats and cron jobs) with only tool_search/tool_describe/tool_call and a catalog of MCP tools: no read, write, exec, or any other core tool. Leave an empty allow list untouched; it already covers the extra names. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Owner
Author
|
Independent review: ship. All ~25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since 2026.9.7, every embedded-harness run (all Ollama models: heartbeats, cron jobs, dashboard chats) starts with only
tool_search,tool_describe, andtool_call, and the catalog holds only MCP tools. Core tools (read,write,edit,exec,heartbeat_respond, …) are gone, so heartbeats cannot updatememory/heartbeat-state.jsonand report "no file-write tool".Live evidence: heartbeats on 2026.9.6 (
0db687d) had 138–142 tools and calledread/write/edit/ls; from the first 2026.9.7 (0e091da) run on 2026-09-25 17:18 Berlin every run hastoolCount: 3, andtool_searchfor "read file" returns only MCP candidates.Root cause
mergeAlsoAllowPolicyappended names to an emptyallowlist. An empty allow list means "allow everything not denied", so appending made it an allowlist of only the appended names. Default-on Tool Search (openclaw#154068) appends its three controls to every policy layer; with the live config'stools.allow: []the global policy becameallow: [tool_search, tool_describe, tool_call].Fix
Leave an empty allow list untouched in
mergeAlsoAllowPolicy; it already covers the extra names. Registered indocs/fork-features.txtso the sync keeps it until upstream ships an equivalent guard (no upstream fix or issue exists as of0c6971d5e05).Evidence
keeps core tools when Tool Search controls join an empty allow-all listfails before the fix (readmissing) and passes after. Cost: single test, file run ~19s wall (vitest run <file> -t), mostly transform.agent-tools.create-openclaw-coding-tools,tool-policy,agent-tools.policy,tool-search,harness/tool-surface-bridge(285 tests) and the othermergeAlsoAllowPolicycallers' suites (212 tests).pnpm tsgo:coreclean,check-fork-features81 present.scripts/run-vitest.mjscannot build its worker in this fork becausevitest-worker-build-entries.mtslists.github/workflows/plugin-npm-release.yml, which the fork removed; tests ran viapnpm exec vitest run.🤖 Generated with Claude Code