revert(agent-manager): restore provider-compatible tool schema - #13203
Merged
Conversation
marius-kilocode
enabled auto-merge
August 18, 2026 11:41
chrarnoldus
reviewed
Aug 18, 2026
chrarnoldus
approved these changes
Aug 18, 2026
Co-authored-by: Christiaan Arnoldus <christiaan.arnoldus@outlook.com>
This was referenced Aug 18, 2026
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.
Reverts #13197.
That PR changed the
agent_managertool's advertisedinput_schemafrom a flat object to a root-levelanyOfunion of five operation branches. Anthropic rejects that shape outright on every route (direct, Bedrock, and Vertex):Supplying the missing
type: "object"surfaces the underlying constraint:The blast radius is much wider than Agent Manager.
agent_manageris advertised wheneverKILO_CLIENT=vscode, and the tool map is sorted alphabetically before the provider call, so it lands ontools.0. A single rejected tool schema aborts the entire request, which means every message to every Claude model in the VS Code extension fails, including ones that never touch Agent Manager. A bare "Say OK and nothing else." prompt reproduces it withKILO_CLIENT=vscodeand succeeds withKILO_CLIENT=cli.This is a re-regression. #12244 fixed this same incompatibility on 2026-07-15 by advertising a flat object schema while keeping the Effect union as the runtime validator, and added a regression test asserting an object root with no top-level combinators.
That test was not deleted by #13197, it was inverted in place:
The test was also renamed from "uses an object-root input schema without combinators" to "advertises each operation as a strict union branch", so it no longer reads as a provider-compatibility guard. The two assertions encoding the Anthropic constraint now assert its opposite, which is why CI stayed green while
maincould not talk to any Claude model. An inverted assertion is harder to catch in review than a deleted one, because the test count does not move and the change looks like routine test maintenance for a new design.Reverting rather than forward-fixing because #13197 closed no reported issue. Its motivation was speculative hardening against a model sending a mixed start/manage payload, and no user-facing behavior depends on it. A correct forward fix also has to satisfy a second, opposing constraint: with a flat schema, providers that force strict structured outputs populate every advertised property, so the strict branch check has to tolerate null and empty values or it rejects legitimate calls. Claude does this too, emitting
{"action":"stop","sessionID":"...","mode":null,"tasks":null,...}unprompted. That design introduces semantics that have never run in production and should land on its own merits with review, not as a same-day patch on top of a brokenmain.Restoring the previous schema returns
agent_managerto a shape that has been in production since 2026-07-15. A follow-up will add a registry-wide guard that walks every advertised tool and asserts an object root with no top-level combinator. That guard deliberately lives outside any single tool's test file and is phrased as a cross-tool invariant, because the failure mode here was not missing coverage but a per-tool assertion being rewritten by the same change that broke the shape. Flipping a shared invariant requires consciously exempting your own tool, which is visible in review.