openclaw - 💡(How to fix) Fix infer model run --gateway fails 'No callable tools remain' when modelRun:true + tools.allow has explicit entries (4.25) [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73878Fetched 2026-04-29 06:13:46
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
0
Timeline (top)
commented ×3closed ×1cross-referenced ×1mentioned ×1

In 4.25, openclaw infer model run --gateway sets modelRun: true which is intended to disable tools for one-shot model probes. However, the explicit-allowlist precheck (buildEmptyExplicitToolAllowlistError) still runs against tools.allow config and surfaces a fatal error before model invocation. This breaks any gateway-mode CLI model probe in environments where tools.allow has explicit entries.

Blast radius is wider than CLI: any embedded run that orphans a tool name in tools.alsoAllow (e.g. when a plugin is disabled but its tool registrations remain in peripheral config) hits the same precheck and times out the embedded path silently. Observed in production via the active-memory plugin disable cascade on 2026-04-28.

Error Message

Error: No callable tools remain after resolving explicit tool allowlist (tools.allow: *, lobster, elevenlabs, tavily, firecrawl, fal, runway, exa, voice-call, apify); tools are disabled for this run. Fix the allowlist or enable the plugin that registers the requested tool.

Root Cause

Root cause (per source diff)

Fix Action

Fix / Workaround

  • Originally observed: OpenClaw 2026.4.25 (aa36ee6)
  • Confirmed still present in: OpenClaw 2026.4.26 (be8c246)
  • Install: npm-global at /home/openclawops/.npm-global/lib/node_modules/openclaw/openclaw.mjs (despite update status reporting "pnpm")
  • Verified: vanilla runtime (no local patches)
  • Not present in 4.24 (per source diff)

Workaround (current)

Code Example

openclaw infer model run --gateway --model openai-codex/gpt-5.5 --prompt 'reply: ok'

---

Error: No callable tools remain after resolving explicit tool allowlist
(tools.allow: *, lobster, elevenlabs, tavily, firecrawl, fal, runway, exa, voice-call, apify);
tools are disabled for this run.
Fix the allowlist or enable the plugin that registers the requested tool.

---

openclaw infer model run --model openai-codex/gpt-5.5 --prompt 'reply: ok'
# returns model output normally
RAW_BUFFERClick to expand / collapse

Upstream bug report DRAFT — pending Trent blind-pass

Target: github.com/openclaw/openclaw/issues Status: DRAFT v0 — not filed. Needs Trent review of repro + RCA before submission.


Title

infer model run --gateway fails with "No callable tools remain" when modelRun:true + tools.allow has explicit entries (4.25 + 4.26)

Environment

  • Originally observed: OpenClaw 2026.4.25 (aa36ee6)
  • Confirmed still present in: OpenClaw 2026.4.26 (be8c246)
  • Install: npm-global at /home/openclawops/.npm-global/lib/node_modules/openclaw/openclaw.mjs (despite update status reporting "pnpm")
  • Verified: vanilla runtime (no local patches)
  • Not present in 4.24 (per source diff)

4.26 source locations

  • dist/selection-D9uTvvsw.js:3917buildEmptyExplicitToolAllowlistError
  • dist/selection-D9uTvvsw.js:6377 — guard invoked during tool allowlist resolution
  • dist/plugin-sdk/src/agents/tool-allowlist-guard.d.ts:9 — type declaration

The 4.26 CLI hang (filed separately as a different bug) is a SEPARATE surface, not a manifestation of this allowlist precheck — these are two distinct issues affecting CLI model probes.

Summary

In 4.25, openclaw infer model run --gateway sets modelRun: true which is intended to disable tools for one-shot model probes. However, the explicit-allowlist precheck (buildEmptyExplicitToolAllowlistError) still runs against tools.allow config and surfaces a fatal error before model invocation. This breaks any gateway-mode CLI model probe in environments where tools.allow has explicit entries.

Blast radius is wider than CLI: any embedded run that orphans a tool name in tools.alsoAllow (e.g. when a plugin is disabled but its tool registrations remain in peripheral config) hits the same precheck and times out the embedded path silently. Observed in production via the active-memory plugin disable cascade on 2026-04-28.

Reproduction

On 4.25 with tools.allow containing explicit entries (e.g. ["*", "lobster", "elevenlabs", ...]):

openclaw infer model run --gateway --model openai-codex/gpt-5.5 --prompt 'reply: ok'

Returns:

Error: No callable tools remain after resolving explicit tool allowlist
(tools.allow: *, lobster, elevenlabs, tavily, firecrawl, fal, runway, exa, voice-call, apify);
tools are disabled for this run.
Fix the allowlist or enable the plugin that registers the requested tool.

Without --gateway (local mode), the same probe succeeds:

openclaw infer model run --model openai-codex/gpt-5.5 --prompt 'reply: ok'
# returns model output normally

Root cause (per source diff)

The code path for infer model run --gateway:

  1. Sets modelRun: true flag
  2. modelRun: true intentionally suppresses tool registration (tools should be disabled for one-shot probes)
  3. BUT: code still runs buildEmptyExplicitToolAllowlistError precheck against tools.allow config
  4. Precheck sees explicit allowlist entries vs registered-tool-set (empty due to suppression)
  5. Concludes "no callable tools remain" and surfaces fatal error

Source location (4.25): runtime/openclaw-2026.4.25/dist/extensions/codex/...buildEmptyExplicitToolAllowlistError function. 4.24 source line ~151163 (per pre-cutover grep).

Suggested fix

Either:

  • Skip buildEmptyExplicitToolAllowlistError precheck entirely when modelRun: true, OR
  • Pass disableTools: true consistently so the precheck short-circuits to non-fatal

The first option is simpler; the second handles other code paths that may end up in the same suppression mode.

Related production impact (worth including in body)

On 2026-04-28, the active-memory plugin was disabled while its tool names (memory_get, memory_search) remained in tools.alsoAllow. The orphaned entries triggered this same precheck on EVERY embedded run — not just CLI gateway-mode. Production lane (Trent agent on Telegram) started failing silently with the same error fingerprint until tools.alsoAllow was emptied.

The bug isn't narrow to --gateway CLI usage. Any embedded run with orphan entries in tools.alsoAllow hits it. Recommend the fix considers both paths.

Workaround (current)

For one-shot model probes from CLI, omit --gateway flag. For embedded runs, ensure tools.alsoAllow only contains entries for currently-registered plugins.

extent analysis

TL;DR

To fix the "No callable tools remain" error when running openclaw infer model run --gateway, skip the buildEmptyExplicitToolAllowlistError precheck when modelRun: true or pass disableTools: true consistently.

Guidance

  • Identify the code path for infer model run --gateway and verify that modelRun: true is set, which should suppress tool registration.
  • Check the buildEmptyExplicitToolAllowlistError function to ensure it is not running when modelRun: true.
  • Consider passing disableTools: true to short-circuit the precheck and prevent fatal errors.
  • Review the tools.allow and tools.alsoAllow configurations to ensure they do not contain orphaned entries that could trigger the precheck.

Example

No code snippet is provided as the issue does not contain sufficient information to create a minimal example.

Notes

The suggested fix should consider both CLI gateway-mode and embedded runs, as the bug can affect any run with orphaned entries in tools.alsoAllow.

Recommendation

Apply the workaround by skipping the buildEmptyExplicitToolAllowlistError precheck when modelRun: true, as it is a simpler solution that addresses the root cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix infer model run --gateway fails 'No callable tools remain' when modelRun:true + tools.allow has explicit entries (4.25) [3 comments, 3 participants]