You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] tools.profile (coding) warns about apply_patch as unknown entry on non-OpenAI providers #40538
When using the built-in coding tools profile with a non-OpenAI provider (e.g. Anthropic), the gateway logs a warning on every session init:
[tools] tools.profile (coding) allowlist contains unknown entries (apply_patch).
These entries won't match any tool unless the plugin is enabled.
This fires repeatedly — on every session start, reset, and tool policy evaluation.
Root Cause
The coding profile's allowlist includes apply_patch (which is an OpenAI-specific tool for multi-file patches). When the active provider is Anthropic/Claude, apply_patch is never registered as a tool, so stripPluginOnlyAllowlist() in tool-policy-pipeline.ts flags it as an unknown entry.
The tool IS in DEFAULT_TOOL_ALLOW and TRUSTED_TOOL_RESULT_MEDIA, so it's intentionally part of the ecosystem — it's just provider-specific.
Impact
Warning noise in logs on every session lifecycle event
Confusing for users who haven't configured anything custom — the warning suggests misconfiguration but it's the built-in profile
Makes it harder to spot real warnings in log output
Expected Behavior
Provider-specific tools in built-in profiles should either:
Be silently ignored when the provider doesn't support them (no warning)
Be conditionally included in the profile based on the active provider
At minimum, the warning should be downgraded to debug level for built-in profile entries
Reproduction
Set tools.profile: "coding" in openclaw.json (or use it as default)
Use any non-OpenAI provider (e.g. anthropic/claude-sonnet-4-6)
This was during an active openai-codex/gpt-5.4 session. So apply_patch is not being registered as a tool on any provider in 2026.3.7, despite being listed in DEFAULT_TOOL_ALLOW and TRUSTED_TOOL_RESULT_MEDIA.
Also notable: cron appears as unknown in some entries too (likely before the cron tool registers on startup — similar race condition to the mnemosyne context engine load-order issue we reported in #40527).
tools.exec.applyPatch.enabled: true in config (we don't have this)
Provider must be OpenAI or OpenAI-Codex (isOpenAIProvider() check)
Model must match applyPatch.allowModels whitelist
Since we never set tools.exec.applyPatch.enabled: true, the tool never registers on ANY provider — OpenAI or not. That's why it shows as "unknown" universally.
But even with enabled: true, it would ONLY work on OpenAI models (hardcoded isOpenAIProvider() check). #17087 is the feature request to generalize it to all providers.
PR #38849 (fix(agents): clarify unavailable core tool warnings) teaches the warning pipeline to distinguish between truly unknown tools vs known-but-unavailable-in-this-context tools. This would downgrade the warning to something like "allowlist includes known tools unavailable in this runtime context (apply_patch)" instead of the current misleading "unknown entries" message.
This issue is effectively a duplicate of what #38849 addresses. Linking for reference.
Root cause: apply_patch is an experimental, triple-gated tool (applyPatch.enabled + OpenAI provider + model allowlist). The coding profile includes it in its allowlist, but the tool never registers unless explicitly opted in. The warning is technically correct but poorly worded — #38849 addresses that.
Activity
Adam-Researchh commentedon Mar 9, 2026
Correction: This warning also fires on OpenAI/Codex providers (GPT 5.4 via
openai-codex), not just non-OpenAI. Log evidence:This was during an active
openai-codex/gpt-5.4session. Soapply_patchis not being registered as a tool on any provider in 2026.3.7, despite being listed inDEFAULT_TOOL_ALLOWandTRUSTED_TOOL_RESULT_MEDIA.Also notable:
cronappears as unknown in some entries too (likely before the cron tool registers on startup — similar race condition to the mnemosyne context engine load-order issue we reported in #40527).Adam-Researchh commentedon Mar 9, 2026
Updated Root Cause (after source investigation)
GPT 5.4 was right to flag this.
apply_patchis an experimental, gated tool — not just a provider compatibility issue.The gating logic (line 70907 in
reply-C5LKjXcC.js):Three conditions must ALL be true:
tools.exec.applyPatch.enabled: truein config (we don't have this)isOpenAIProvider()check)applyPatch.allowModelswhitelistSince we never set
tools.exec.applyPatch.enabled: true, the tool never registers on ANY provider — OpenAI or not. That's why it shows as "unknown" universally.Config to enable (per #17087):
{ "tools": { "exec": { "applyPatch": { "enabled": true, "allowModels": ["gpt-5.2", "gpt-5.4"] } } } }But even with
enabled: true, it would ONLY work on OpenAI models (hardcodedisOpenAIProvider()check). #17087 is the feature request to generalize it to all providers.The real fix is already in PR #38849
PR #38849 (
fix(agents): clarify unavailable core tool warnings) teaches the warning pipeline to distinguish between truly unknown tools vs known-but-unavailable-in-this-context tools. This would downgrade the warning to something like "allowlist includes known tools unavailable in this runtime context (apply_patch)" instead of the current misleading "unknown entries" message.This issue is effectively a duplicate of what #38849 addresses. Linking for reference.
Adam-Researchh commentedon Mar 9, 2026
Closing — this is effectively covered by existing work:
apply_patchbeyond OpenAI-only providersRoot cause:
apply_patchis an experimental, triple-gated tool (applyPatch.enabled+ OpenAI provider + model allowlist). Thecodingprofile includes it in its allowlist, but the tool never registers unless explicitly opted in. The warning is technically correct but poorly worded — #38849 addresses that.fix(tools): recognize catalog-known tools in allowlist validation (op…