Repository navigation
fix(plugins): resolve provider policy surface for plugin-owned CLI backends - #93261
vincentkoc merged 2 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 6:58 AM ET / 10:58 UTC. Summary PR surface: Source +11, Tests +64. Total +75 across 2 files. Reproducibility: yes. from source inspection: current Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical provider-policy ownership fix that uses manifest Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current Is this the best way to solve the issue? Yes for the narrow bug: using existing manifest AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e7ee1c55b433. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +11, Tests +64. Total +75 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
…ckends A plugin's bundled provider-policy surface was only resolvable for the providers it declares in `providers` (or via `providerAuthAliases`), never for the CLI backends it declares in `cliBackends`. A CLI-backend provider such as `claude-cli` — owned by the anthropic plugin, whose policy surface already handles `case "claude-cli"` — therefore resolved to no policy surface. Subagent/child sessions resolve the thinking profile through this surface, so `claude-cli` models fell back to the base profile: `thinking: "max"` threw `Thinking level "max" is not supported` (cascading to a model fallback) and an omitted `thinking` silently clamped to `high`. Main sessions were unaffected. Teach `pluginOwnsProviderPolicyRef` to also treat a plugin's `cliBackends` as owned providers, so the owning plugin's policy surface — and its full max-capable Claude thinking profile — resolves for the CLI backend too. Adds a unit test covering CLI-backend-owned policy surface resolution.
2da6f14 to
27ebfc7
Compare
|
Maintainer verification complete. This is the best narrow fix for #93259. Ownership and contract review:
Verification:
The PR body proof fields were normalized to the repository parser and validate locally. Known gap: the contributor's live A/B used a real |
|
Merged via squash.
Thanks @BitmapAsset! |
…ckends (openclaw#93261) Merged via squash. Prepared head SHA: 27ebfc7 Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc
What
pluginOwnsProviderPolicyRefnow also treats a plugin'scliBackendsas owned providers, so a plugin's bundled provider-policy surface resolves for the CLI backends it declares — not only forproviders/providerAuthAliases.Why
claude-cliis owned by the anthropic plugin viacliBackends: ["claude-cli"], andextensions/anthropic/provider-policy-api.tsalready handlescase "claude-cli"(returning the max-capable Claude thinking profile). ButresolveBundledProviderPolicySurface("claude-cli")returnednull, because policy ownership was only derived fromproviders/providerAuthAliases.In subagent / child sessions — where the thinking profile is resolved — this made
claude-climodels fall back to the base profile (off, minimal, low, medium, high):thinking: "max"threwThinking level "max" is not supported, which cascaded to the model fallback chain (the subagent landed on a different model); andthinkingsilently clamped tohigh.Main sessions were unaffected. This also fixes the same class of issue for any other CLI-backend provider whose policy is served by its owning plugin.
Fixes #93259.
Change
src/plugins/provider-public-artifacts.ts: inpluginOwnsProviderPolicyRef, also matchplugin.cliBackends.src/plugins/provider-public-artifacts.test.ts: add a test that a plugin-owned CLI backend resolves its owning plugin's policy surface.No provider-registration, manifest, or auth changes; no new bundled artifacts.
Real behavior proof
Behavior addressed:
claude-clisubagents could not usemax/xhighthinking — the claude-cli provider-policy surface did not resolve in child sessions, sothinking: "max"errored and fell back to a different model, while an omitted level silently clamped tohigh(#93259).Real environment tested: a real OpenClaw
2026.6.6instance, claude-cli backend, modelclaude-opus-4-8, spawning actual subagent sessions.Exact steps or command run after this patch: with the claude-cli provider-policy surface resolving for child sessions, spawn two real subagents on
claude-cli/claude-opus-4-8— one withthinking: "max", one withthinking: "xhigh"— and read back each child's resolved model and thinking effort.Before evidence (optional): before the surface resolved, the same
thinking: "max"spawn produced:…and then cascaded to a
claude-opus-4-7fallback.Evidence after fix: live output copied from the running instance after the claude-cli surface resolves:
Observed result after fix: both subagents ran on
claude-opus-4-8at the requested effort (maxandxhigh), with no model fallback and no clamp tohigh. Main sessions were unaffected throughout.What was not tested: the live A/B above was captured on a real
2026.6.6instance by making the claude-cli policy surface resolve for child sessions (the user-visible behavior this PR restores); I did not additionally rebuild the monorepo to hot-swap this exact branch into that gateway. The unit test added here (resolves bundled policy artifacts for a plugin-owned CLI backend) covers this PR's exactcliBackendsownership change. Non-Claude CLI backends were not exercised.Test plan
resolves bundled policy artifacts for a plugin-owned CLI backend; the fullprovider-public-artifacts.test.tssuite passes (9/9).No
CHANGELOG.mdchange (per CONTRIBUTING).