Repository navigation
Description
Client or integration
Claude Code
Provider or upstream service
kiro
OpenCodex version
2.98.0 and 2.99.0 (identical Kiro adapter files on dev at 4a22eda)
Endpoint or capability
/v1/messages (Claude Code CLI and Claude Desktop) routed to Kiro: tool calls and reasoning effort
Current behaviour
For a Claude Code or Claude Desktop request routed to a Kiro Claude model, the adapter changes the request in five ways that the measurements below show are no longer needed:
- Tool count and byte budget.
src/adapters/kiro-tools.tskeeps at most 48 client tools and 96 KB of converted JSON (MAX_KIRO_TOOL_COUNT,MAX_KIRO_TOOL_CATALOG_BYTES, from [Bug][Kiro] Large MCP tool catalogs trigger CONTENT_FILTERED before generation #719). Claude Desktop declares 118 client tools today (113 on 2026-11-07), so at least 70 are omitted every turn. Every tool has priority 3 and is admitted in declaration order, somcp__ccd_turn__update_planandmcp__ccd_turn__wrap_up, at positions 83 and 84, are always dropped, although the client requires them on every turn. The model receives[opencodex] Kiro's outbound catalog budget allows 48 of 113 client tools this turn. Omitted and unavailable this turn: …. - Tool descriptions. Every description is cut to 1,024 characters (
MAX_KIRO_TOOL_DESCRIPTION_UNVERIFIED). On Claude Code's own catalog this halves the description text (32,430 to 16,685 characters across 25 tools). - Tool schemas.
sanitizeKiroSchemaremoves 29 JSON Schema keywords (KIRO_REJECTED_SCHEMA_KEYS). On Claude Code's catalog that is 69 constraints, among themmaxLength,minimum,maximumandpattern, so the model never sees the limits of the arguments it fills. - Reasoning effort. Only
claude-opus-5andclaude-opus-5.5getadditionalModelRequestFields.output_config.effort. Every other Claude model gets the emulated<thinking_mode>/<max_thinking_length>block prepended to the user message instead. - Tool-catalog nudge.
buildNonOpenAIToolCatalogNudgeFromNamesprepends a "Tool contract" paragraph that lists every tool name again and bans neighbouring-agent tools (Grep,Glob,LS). Claude clients already send their own tool rules and the full catalog, so for them it only repeats the catalog (about 2,700 characters with 113 tools).
Expected behaviour
For Kiro Claude models reached through the Messages surface, the adapter sends what Kiro accepts:
- The whole client tool catalog.
- Full tool descriptions.
- Tool schemas with their constraints (root
oneOf/anyOf/allOfflattening stays, it is a wire requirement). - Native
output_config.effortfor every Claude model and rung Kiro accepts, and the emulated block only where Kiro rejects the native field. - No tool-catalog nudge for Messages-surface requests; the completion contract (
codex_kiro_final_answer) stays. Codex requests (/v1/responses) keep the nudge.
Non-Claude Kiro models (GPT, DeepSeek, MiniMax, GLM, Qwen) were not probed and keep the current schema sanitizing.
Minimal redacted request or reproduction
# Effort: one request per model and rung (opencodex on 127.0.0.1:10100, Kiro OAuth account)
curl -sS http://127.0.0.1:10100/v1/messages \
-H 'content-type: application/json' -H 'anthropic-version: 2023-06-01' \
-d '{"model":"kiro/claude-sonnet-5.5","max_tokens":600,"output_config":{"effort":"xhigh"},
"messages":[{"role":"user","content":"Reply with exactly: OK"}]}'
# Schema: a constrained tool kept intact, on a Claude model
curl -sS http://127.0.0.1:10100/v1/messages \
-H 'content-type: application/json' -H 'anthropic-version: 2023-06-01' \
-d '{"model":"kiro/claude-opus-5.5","max_tokens":400,
"tools":[{"name":"forecast","description":"Get the weather forecast.","input_schema":{
"$schema":"http://json-schema.org/draft-07/schema#","type":"object","additionalProperties":false,
"properties":{"city":{"type":"string","pattern":"^[A-Z][a-z]+$"},
"days":{"type":"integer","minimum":1,"maximum":7}},
"required":["city","days"]}}],
"messages":[{"role":"user","content":"Use the forecast tool for paris over 30 days."}]}'The native-field and intact-schema shapes were sent with a local build of the adapter; the patch is in the notes below.
Actual response or error
# Live results, 2026-11-07, one Kiro OAuth account, region us-east-1.
# Tool catalog: Claude Desktop, 113 tools, full descriptions, 2026-11-07 14:47-18:00:
# 649 x HTTP 200, no CONTENT_FILTERED, no ValidationException
# (the 12 HTTP 400 in that window came from an exhausted monthly credit quota).
# output_config.effort, accepted (HTTP 200, stop_reason end_turn) at:
claude-opus-5.5, claude-opus-5, claude-opus-4.8, claude-opus-4.7,
claude-sonnet-5.5, claude-sonnet-5, claude-haiku-5.5 low medium high xhigh max
claude-opus-4.6, claude-sonnet-4.6 low medium high max
# rejected (HTTP 400 invalid_request_error), same model without the field answers normally:
claude-opus-4.6, claude-sonnet-4.6 xhigh
claude-haiku-4.5, claude-opus-4.5, claude-sonnet-4.5 every rung
# Tool schema keywords on claude-opus-4.5, one keyword per request -> all 28 accepted:
$schema additionalProperties pattern format minLength maxLength minimum maximum
exclusiveMinimum exclusiveMaximum multipleOf minItems maxItems uniqueItems
minProperties maxProperties contentEncoding contentMediaType patternProperties
propertyNames dependentRequired dependentSchemas if/then/else contains
unevaluatedProperties unevaluatedItems encrypted
# Claude Code's 25-tool catalog with intact schemas -> accepted.
# The constrained tool above, on claude-opus-5.5 and claude-sonnet-5.5:
stop_reason=tool_use input={"city": "Paris", "days": 7} # pattern and maximum honoured
# Without the nudge, a Claude Code CLI task (Read, Write, Bash) completed in 4 turns.Upstream documentation
- https://kiro.dev/docs/models/effort/ (updated 2026-10-09): lists
output_config.effortfor Opus 5, 4.8, 4.7, 4.6 and Sonnet 5.5, 5, 4.6. Opus 5.5 and Haiku 5.5 are not listed but accept the field. The page listsxhighfor neither 4.6 model, which matches the 400. - https://kiro.dev/docs/models/ (updated 2026-10-24): Opus 5.5, Sonnet 5.5 and Haiku 5.5 are published;
src/providers/kiro-models.tsstill marks them preemptive. - No public specification of the CodeWhisperer tool-spec validator exists; the keyword results above are measurements.
- https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools: "Provide extremely detailed descriptions. This is by far the most important factor in tool performance."
Suggested mapping or implementation notes
Proposed in #8451, with the live probes requested in the triage note:
src/adapters/kiro/reasoning.ts: addclaude-opus-4.8,claude-opus-4.7,claude-opus-4.6,claude-sonnet-5.5,claude-sonnet-5,claude-sonnet-4.6,claude-haiku-5.5toKIRO_NATIVE_EFFORT_FIELDS; keepxhighemulated for the 4.6 pair, the same wayKIRO_LUNA_TERRA_NATIVE_EFFORTSdoes for Luna and Terra.src/adapters/kiro-tools.ts:sanitizeKiroSchemaandensureRootObjectTypetake the rejected-key set as a parameter; Claude models pass an empty set, other families keepKIRO_REJECTED_SCHEMA_KEYS.src/server/responses/request-prepare.ts+src/types/request.ts: setparsed._anthropicInbound = truein the existinginboundWire === "anthropic"branch;src/adapters/kiro/payload.tsskips the catalog nudge when it is set.- Tool count, byte budget and description cap: the local patch gates them behind
OCX_KIRO_TOOL_BUDGET=off/OCX_KIRO_TOOL_DESCRIPTION_LIMIT=off. A maintainer decision is needed between an opt-out, a config key, or dropping the limits for Claude models. src/providers/kiro-models.ts: replace the "preemptive" comments for the three 5.5 Claude models.
Tests: one native-effort test per model and accepted rung, emulated tests for the rejected models and for 4.6 xhigh, schema tests (intact for Claude, stripped for gpt-5.6-sol, root flattening kept), and an end-to-end test through startServer showing /v1/messages without the nudge and /v1/responses with it. bun test tests/providers/kiro tests/server/server-kiro-structured-output-e2e.test.ts: 837 pass. Five existing sanitizer tests now target gpt-5.6-sol, because the default parsedWith model is a Claude model. Two existing slow tests (K2h, each Kiro evidence module imports on its own) time out intermittently under load on unmodified v2.98.0 too.
Additional context and attachments
Follows #719 (catalog budget), #2407 / #2475 (tool_search priority) and #4682 (GPT-5.6 native effort). Its 48-tool / 96 KB caps were set from a 49-tool probe in July (2.7.43) and were never published Kiro limits; three hours of 113-tool Claude Desktop traffic (649 requests) passed under 2.98.0.
Checks
- I searched existing provider and compatibility issues.
- The request and response were redacted.
- The expected behaviour is based on an upstream specification or a concrete client requirement.
Activity
svc-aibot-363 commentedon Nov 7, 2026
Ready-to-apply patch
The change proposed above, as a patch against
devat6df9e1176767d5da2b674b7d9ee8a8df4bbf2b65. It applies cleanly withgit apply. No PR is opened: a maintainer can apply, review and land it.What it changes
src/adapters/kiro/reasoning.tsoutput_config.effortforclaude-opus-4.8,claude-opus-4.7,claude-opus-4.6,claude-sonnet-5.5,claude-sonnet-5,claude-sonnet-4.6,claude-haiku-5.5;xhighstays emulated on the 4.6 pair (KIRO_NO_XHIGH_NATIVE_MODELS, same pattern as Luna and Terra)src/adapters/kiro-tools.tssanitizeKiroSchemaandensureRootObjectTypetake the rejected-key set as a parameter; Claude models pass an empty set, other families keepKIRO_REJECTED_SCHEMA_KEYS; tool count, byte budget and description cap can be lifted withOCX_KIRO_TOOL_BUDGET=off/OCX_KIRO_TOOL_DESCRIPTION_LIMIT=offsrc/server/responses/request-prepare.ts,src/types/request.tsparsed._anthropicInbound = truein the existinginboundWire === "anthropic"branchsrc/adapters/kiro/payload.ts_anthropicInboundis set; the completion contract stayssrc/providers/kiro-models.tsThe two
OCX_KIRO_*environment switches are the smallest opt-out; replacing them with a config key or dropping the limits for Claude models is a maintainer choice.Tests
xhighon the 4.6 pair and for Haiku 4.5, Opus 4.5 and Sonnet 4.5, schema tests (intact for Claude, stripped forgpt-5.6-sol, root flattening kept), nudge tests at the adapter level, and an end-to-end test throughstartServer(/v1/messagesreaches Kiro without the nudge,/v1/responseskeeps it).gpt-5.6-sol, because the defaultparsedWithmodel is a Claude model; the opus-4.8 steering test now expects the native field._anthropicInboundassignment fails the end-to-end test; revertingreasoning.tsfails nine effort tests.On
dev+ patch, Bun 1.4.4:The full
bun run testsuite was not run. Live behaviour on Kiro is in the issue body. Since 2026-11-07 17:59 the patched build served 293 Claude Desktop and 16 Claude Code requests to Kiro with HTTP 200; the only 400s were five deliberatexhighprobes on the 4.6 pair, which is why that rung stays emulated.Patch (9 files, +311 / -34)
Ingwannu commentedon Nov 8, 2026
Triage note against
dev(f8dfc2f). The current limits are deliberate, not stale:src/adapters/kiro-tools.ts:11-12) was added for [Bug][Kiro] Large MCP tool catalogs trigger CONTENT_FILTERED before generation #719, after Kiro rejected a full Codex Desktop catalog before generation. That fix was based on a measured 49-tool, ~108 KiB probe. Removing the cap reverses that measurement, so it needs a new accepted probe with the 113-tool catalog.kiro-tools.ts:15-19and theKIRO_REJECTED_SCHEMA_KEYSset at:20-56). A Claude-only bypass needs an accepted probe that includesmaxLength,patternand the other stripped keywords.output_config.effortis sent only forclaude-opus-5andclaude-opus-5.5(src/adapters/kiro/reasoning.ts:33-35). Other models use the emulated block until their native support is verified (src/providers/kiro-models.ts:75-77,structure/providers/kiro.md:285-296). Advertised support inListAvailableModelsis not the same as acceptance.The problem you describe in point 1 is real. Over budget, the fill loop stops at the first tool that does not fit (
kiro-tools.ts:243-246), and client tools at the same priority are admitted in declaration order (:181-190,:222). A client-required tool such asmcp__ccd_turn__*can therefore be dropped. The fix we would consider is a priority rule for client-required tools, not removing the cap. Could you share the redacted names of the omitted tools from a Claude Desktop turn, and the position of themcp__ccd_turn__*tools in the declared list?The "ready-to-apply patch" comment is not a PR and we have not reviewed it.
Please send live probe results with no credentials (HTTP status and error type only): (a) the full catalog as declared by the client, (b) one schema with the stripped constraints included, and (c)
output_config.efforton the non-Opus model you want to use.svc-aibot-363 commentedon Nov 9, 2026
Thanks for the triage. The PR is #8451; it keeps the 48-tool / 96 KB budget as the default and adds an operator opt-out, so the #719 measurement still holds for anyone who does not set it.
Answers to your questions:
mcp__ccd_turn__*: Claude Desktop declares 118 client tools today.mcp__ccd_turn__update_planandmcp__ccd_turn__wrap_upare at positions 83 and 84. Every Claude Desktop tool has priority 3, so the default fill loop admits at most the first 48 in declaration order and drops both on every turn, with every tool declared after position 48 (most of session management, then settings, sidebar, view, window, browser preview, docs lookup, scheduled tasks and terminal). Measured on 2026-11-09 from the tool list a Claude Desktop session received through v2.99.0 withOCX_KIRO_TOOL_BUDGET=off. A priority rule for client-required tools would fix those two; the PR description has the probes for sending the whole catalog.output_config.efforton non-Opus-5 models: status and error type for each are in the PR description. In short: 649 HTTP 200 with the full catalog and no validation error; all 28 stripped keywords accepted one by one, andpattern/maximumhonoured in the tool call; native effort accepted on Opus 4.8 and 4.7, Sonnet 5.5 and 5, Haiku 5.5 at every rung and on the 4.6 pair exceptxhigh, rejected on the 4.5 models, which stay emulated.fix(kiro): send the full tool contract and native effort to Kiro Clau…
fix(kiro): send the full tool contract and native effort to Kiro Clau…
lidge-jun commentedon Nov 15, 2026
#8451 landed on
dev(44efa74) and covers the five request changes reported here. Kiro Claude models now receive nativeoutput_config.effort, with xhigh still emulated on the 4.6 pair. Schema keywords are stripped per model as measured. Anthropic-ingress turns no longer get the catalog nudge, and the 48-tool/96 KB budget and the 1,024-character description cap can each be lifted withOCX_KIRO_TOOL_BUDGET=offandOCX_KIRO_TOOL_DESCRIPTION_LIMIT=off. The default budget is unchanged because of #719. One gap remains under that default: same-priority client tools such asmcp__ccd_turn__update_planare still admitted in declaration order. A priority rule for that is a possible follow-up; please open a focused issue if it bites. Closing this one; it ships in the next release.