fix(tools): skip allowlist guard when tools are explicitly disabled#74139
fix(tools): skip allowlist guard when tools are explicitly disabled#74139SymbolStar wants to merge 1 commit into
Conversation
Greptile SummaryThis PR fixes a false-positive error in Confidence Score: 5/5Safe to merge — the change is minimal, well-tested, and correct. The fix is a two-line early return that precisely targets the described failure mode. All pre-existing test cases continue to pass, and the updated test correctly asserts the new null return. The dead disableTools branch removal from the ternary is consistent with the early return. No logic regressions identified. No files require special attention. Reviews (1): Last reviewed commit: "fix(tools): skip allowlist guard when to..." | Re-trigger Greptile |
|
Codex review: needs changes before merge. Summary Reproducibility: yes. source-level. A direct guard call with inherited allowlist sources, zero callable tools, and Next step before merge Security Review findings
Review detailsBest possible solution: Keep this PR open but repair it so disabled LLM-only runs ignore inherited allowlist sources while runtime Do we have a high-confidence way to reproduce the issue? Yes, source-level. A direct guard call with inherited allowlist sources, zero callable tools, and Is this the best way to solve the issue? No. The fix direction is right, but returning Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5ecd01ff94d6. |
When an embedded model run (e.g. llm-task from a Lobster workflow) intentionally disables tools, the explicit tool allowlist guard from the parent session's alsoAllow config should not fire. Previously it would error with 'No callable tools remain' because the allowlist sources existed but no tools were callable (by design). Return null early from buildEmptyExplicitToolAllowlistError when disableTools is true, since disabling tools is an intentional choice that should not be treated as a configuration failure. Fixes openclaw#74019
4034d53 to
748a217
Compare
|
Hi @steipete — friendly ping 🙏 CI is green now (rebased on latest main). Would appreciate a look when you get a chance! |
Summary
When an embedded model run (e.g.
llm-taskinvoked from a Lobster workflow) intentionally disables tools, the explicit tool allowlist guard from the parent session'stools.alsoAllowconfig should not fire.Root Cause
buildEmptyExplicitToolAllowlistErrorinsrc/agents/tool-allowlist-guard.tswould see:sources.length > 0(from parent config'salsoAllowentries likelobster,llm-task)callableToolNames.length === 0(tools are intentionally disabled for the embedded run)This combination triggered the error: "No callable tools remain after resolving explicit tool allowlist ... tools are disabled for this run".
Fix
Early-return
nullfrom the guard whendisableTools === true, since disabling tools is an intentional choice that should not be treated as a configuration failure. Removed the now-unreachabledisableToolsbranch from the error reason.Fixes #74019