Skip to content

[Provider compatibility]: Kiro trims the client tool catalog, strips tool schemas and emulates reasoning effort that Claude models accept natively #8306

Closed

Description

@svc-aibot-363

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:

  1. Tool count and byte budget. src/adapters/kiro-tools.ts keeps 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, so mcp__ccd_turn__update_plan and mcp__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: ….
  2. 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).
  3. Tool schemas. sanitizeKiroSchema removes 29 JSON Schema keywords (KIRO_REJECTED_SCHEMA_KEYS). On Claude Code's catalog that is 69 constraints, among them maxLength, minimum, maximum and pattern, so the model never sees the limits of the arguments it fills.
  4. Reasoning effort. Only claude-opus-5 and claude-opus-5.5 get additionalModelRequestFields.output_config.effort. Every other Claude model gets the emulated <thinking_mode> / <max_thinking_length> block prepended to the user message instead.
  5. Tool-catalog nudge. buildNonOpenAIToolCatalogNudgeFromNames prepends 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:

  1. The whole client tool catalog.
  2. Full tool descriptions.
  3. Tool schemas with their constraints (root oneOf/anyOf/allOf flattening stays, it is a wire requirement).
  4. Native output_config.effort for every Claude model and rung Kiro accepts, and the emulated block only where Kiro rejects the native field.
  5. 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

Suggested mapping or implementation notes

Proposed in #8451, with the live probes requested in the triage note:

  • src/adapters/kiro/reasoning.ts: add claude-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 to KIRO_NATIVE_EFFORT_FIELDS; keep xhigh emulated for the 4.6 pair, the same way KIRO_LUNA_TERRA_NATIVE_EFFORTS does for Luna and Terra.
  • src/adapters/kiro-tools.ts: sanitizeKiroSchema and ensureRootObjectType take the rejected-key set as a parameter; Claude models pass an empty set, other families keep KIRO_REJECTED_SCHEMA_KEYS.
  • src/server/responses/request-prepare.ts + src/types/request.ts: set parsed._anthropicInbound = true in the existing inboundWire === "anthropic" branch; src/adapters/kiro/payload.ts skips 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

  1. added
    provider-compatibility
    account-pool
    catalog
    provider
    on Nov 7, 2026
  2. svc-aibot-363 commented on Nov 7, 2026

    @svc-aibot-363
    ContributorAuthor

    Ready-to-apply patch

    The change proposed above, as a patch against dev at 6df9e1176767d5da2b674b7d9ee8a8df4bbf2b65. It applies cleanly with git apply. No PR is opened: a maintainer can apply, review and land it.

    What it changes

    File Change
    src/adapters/kiro/reasoning.ts output_config.effort for claude-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; xhigh stays emulated on the 4.6 pair (KIRO_NO_XHIGH_NATIVE_MODELS, same pattern as Luna and Terra)
    src/adapters/kiro-tools.ts sanitizeKiroSchema and ensureRootObjectType take the rejected-key set as a parameter; Claude models pass an empty set, other families keep KIRO_REJECTED_SCHEMA_KEYS; tool count, byte budget and description cap can be lifted with OCX_KIRO_TOOL_BUDGET=off / OCX_KIRO_TOOL_DESCRIPTION_LIMIT=off
    src/server/responses/request-prepare.ts, src/types/request.ts parsed._anthropicInbound = true in the existing inboundWire === "anthropic" branch
    src/adapters/kiro/payload.ts no tool-catalog nudge when _anthropicInbound is set; the completion contract stays
    src/providers/kiro-models.ts the three Claude 5.5 models are no longer marked preemptive

    The 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

    • New: one native-effort test per probed Claude model and accepted rung, emulated tests for xhigh on the 4.6 pair and for Haiku 4.5, Opus 4.5 and Sonnet 4.5, schema tests (intact for Claude, stripped for gpt-5.6-sol, root flattening kept), nudge tests at the adapter level, and an end-to-end test through startServer (/v1/messages reaches Kiro without the nudge, /v1/responses keeps it).
    • Updated: five existing sanitizer tests now pass gpt-5.6-sol, because the default parsedWith model is a Claude model; the opus-4.8 steering test now expects the native field.
    • Mutation checks: removing the _anthropicInbound assignment fails the end-to-end test; reverting reasoning.ts fails nine effort tests.

    On dev + patch, Bun 1.4.4:

    bun test tests/providers/kiro tests/server/server-kiro-structured-output-e2e.test.ts \
      tests/usage/usage-provider-credit-price.test.ts tests/usage/usage-cost.test.ts tests/usage/usage-haiku-5-5-pricing.test.ts
    # 1092 pass, 1 fail (two runs): K2h in kiro-images.test.ts, 5.1-5.2 s against a 5 s timeout
    bun test tests/providers/kiro/kiro-images.test.ts
    # 18 pass, 0 fail with and without the patch (two runs each): K2h only times out under the combined run

    The full bun run test suite 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 deliberate xhigh probes on the 4.6 pair, which is why that rung stays emulated.

    Patch (9 files, +311 / -34)
    diff --git a/src/adapters/kiro-tools.ts b/src/adapters/kiro-tools.ts
    index 4466ddf..f643f64 100644
    --- a/src/adapters/kiro-tools.ts
    +++ b/src/adapters/kiro-tools.ts
    @@ -10,6 +10,10 @@ const MAX_KIRO_TOOL_DESCRIPTION_GPT_56_SOL = 9_216;
     // slots for Kiro's private completion tool and headroom for the enclosing request/message fields.
     export const MAX_KIRO_TOOL_COUNT = 48;
     export const MAX_KIRO_TOOL_CATALOG_BYTES = 96_000;
    +// Opt-out for operators whose Kiro account accepts the full client catalog; read per request.
    +export const KIRO_TOOL_BUDGET_ENV = "OCX_KIRO_TOOL_BUDGET";
    +// Same opt-out for the per-tool description cap; read per request.
    +export const KIRO_TOOL_DESCRIPTION_LIMIT_ENV = "OCX_KIRO_TOOL_DESCRIPTION_LIMIT";
     const textEncoder = new TextEncoder();
     
     // JSON Schema validation/annotation keywords that Kiro's runtimeservice tool-spec validator
    @@ -17,6 +21,8 @@ const textEncoder = new TextEncoder();
     // but the `memories__*` tools (add_ad_hoc_note/read/search/list) emit pattern/length/range
     // constraints via schemars, which trip the validator. Strip them everywhere in the schema tree;
     // the constraints are advisory for the model, so dropping them does not change tool behavior.
    +// Claude models accept every one of these keys (live probe on 2026-11-07, one key per request
    +// plus a full Claude Code catalog), so their schemas keep the constraints the model needs.
     const KIRO_REJECTED_SCHEMA_KEYS = new Set([
       "additionalProperties",
       "pattern",
    @@ -65,28 +71,30 @@ const SCHEMA_MAP_KEYS = new Set(["properties", "$defs", "definitions"]);
     // silently changing the value a tool argument must equal.
     const SCHEMA_LITERAL_KEYS = new Set(["const", "enum", "default", "examples"]);
     
    -function sanitizeSchemaMap(value: unknown): unknown {
    -  if (!value || typeof value !== "object" || Array.isArray(value)) return sanitizeKiroSchema(value);
    +const NO_SCHEMA_KEYS: ReadonlySet<string> = new Set();
    +
    +function sanitizeSchemaMap(value: unknown, rejected: ReadonlySet<string> = KIRO_REJECTED_SCHEMA_KEYS): unknown {
    +  if (!value || typeof value !== "object" || Array.isArray(value)) return sanitizeKiroSchema(value, rejected);
       // fromEntries defines own properties: a property named "__proto__" stays a property instead of
       // hitting the prototype setter and vanishing from the advertised schema.
    -  return Object.fromEntries(Object.entries(value as Record<string, unknown>).map(([name, child]) => [name, sanitizeKiroSchema(child)]));
    +  return Object.fromEntries(Object.entries(value as Record<string, unknown>).map(([name, child]) => [name, sanitizeKiroSchema(child, rejected)]));
     }
     
     /** Strip the keywords Kiro's tool-spec validator rejects, everywhere in a schema tree. */
    -export function sanitizeKiroSchema(value: unknown): unknown {
    -  if (Array.isArray(value)) return value.map(sanitizeKiroSchema);
    +export function sanitizeKiroSchema(value: unknown, rejected: ReadonlySet<string> = KIRO_REJECTED_SCHEMA_KEYS): unknown {
    +  if (Array.isArray(value)) return value.map(child => sanitizeKiroSchema(child, rejected));
       if (!value || typeof value !== "object") return value;
       const out: Array<[string, unknown]> = [];
       for (const [key, child] of Object.entries(value as Record<string, unknown>)) {
    -    if (KIRO_REJECTED_SCHEMA_KEYS.has(key)) continue;
    +    if (rejected.has(key)) continue;
         if (key === "required" && Array.isArray(child) && child.length === 0) continue;
         if (SCHEMA_LITERAL_KEYS.has(key)) out.push([key, child]);
    -    else out.push([key, SCHEMA_MAP_KEYS.has(key) ? sanitizeSchemaMap(child) : sanitizeKiroSchema(child)]);
    +    else out.push([key, SCHEMA_MAP_KEYS.has(key) ? sanitizeSchemaMap(child, rejected) : sanitizeKiroSchema(child, rejected)]);
       }
       return Object.fromEntries(out);
     }
     
    -function ensureRootObjectType(schema: unknown): Record<string, unknown> {
    +function ensureRootObjectType(schema: unknown, rejected: ReadonlySet<string> = KIRO_REJECTED_SCHEMA_KEYS): Record<string, unknown> {
       const obj = schema && typeof schema === "object" && !Array.isArray(schema)
         ? schema as Record<string, unknown>
         : {};
    @@ -109,7 +117,7 @@ function ensureRootObjectType(schema: unknown): Record<string, unknown> {
       // Seed with the root's own properties/required so a schema like
       // { type:"object", properties:{path}, required:["path"], oneOf:[...] } keeps them.
       if (obj.properties && typeof obj.properties === "object") {
    -    Object.assign(props, sanitizeSchemaMap(obj.properties) as Record<string, unknown>);
    +    Object.assign(props, sanitizeSchemaMap(obj.properties, rejected) as Record<string, unknown>);
       }
       if (Array.isArray(obj.required)) {
         for (const r of obj.required) if (typeof r === "string") required.add(r);
    @@ -124,7 +132,7 @@ function ensureRootObjectType(schema: unknown): Record<string, unknown> {
           if (!variant || typeof variant !== "object" || Array.isArray(variant)) continue;
           const v = variant as Record<string, unknown>;
           if (v.properties && typeof v.properties === "object") {
    -        Object.assign(props, sanitizeSchemaMap(v.properties) as Record<string, unknown>);
    +        Object.assign(props, sanitizeSchemaMap(v.properties, rejected) as Record<string, unknown>);
           }
           if (mergeRequired && Array.isArray(v.required)) {
             for (const r of v.required) if (typeof r === "string") required.add(r);
    @@ -147,6 +155,7 @@ function ensureRootObjectType(schema: unknown): Record<string, unknown> {
     }
     
     function toolDescriptionLimit(modelId: string): number {
    +  if (process.env[KIRO_TOOL_DESCRIPTION_LIMIT_ENV] === "off") return Number.POSITIVE_INFINITY;
       return normalizeKiroModelId(modelId) === "gpt-5.6-sol"
         ? MAX_KIRO_TOOL_DESCRIPTION_GPT_56_SOL
         : MAX_KIRO_TOOL_DESCRIPTION_UNVERIFIED;
    @@ -196,6 +205,7 @@ export function convertKiroToolContext(
     ): { tools: unknown[]; systemAdditions: string[]; nameMap: Map<string, string>; registry: KiroToolNameRegistry } {
       const tools = parsed.context.tools ?? [];
       const descriptionLimit = toolDescriptionLimit(parsed.modelId);
    +  const rejectedSchemaKeys = normalizeKiroModelId(parsed.modelId).startsWith("claude-") ? NO_SCHEMA_KEYS : KIRO_REJECTED_SCHEMA_KEYS;
       // Validate every listed name even when tool_choice:none emulates a tool-free turn.
       for (const tool of tools) registry.alias(namespacedToolName(tool.namespace, tool.name));
       const effectiveTools = parsed.options.toolChoice === "none" ? [] : tools;
    @@ -211,13 +221,14 @@ export function convertKiroToolContext(
           toolSpecification: {
             name: toolName,
             description: truncateDescription(description, descriptionLimit),
    -        inputSchema: { json: ensureRootObjectType(sanitizeKiroSchema(tool.parameters ?? {})) },
    +        inputSchema: { json: ensureRootObjectType(sanitizeKiroSchema(tool.parameters ?? {}, rejectedSchemaKeys), rejectedSchemaKeys) },
           },
         };
         return { tool, index, converted };
       });
    -  const exceedsBudget = convertedEntries.length > MAX_KIRO_TOOL_COUNT
    -    || serializedToolCatalogBytes(convertedEntries.map(entry => entry.converted)) > MAX_KIRO_TOOL_CATALOG_BYTES;
    +  const unbounded = process.env[KIRO_TOOL_BUDGET_ENV] === "off";
    +  const exceedsBudget = !unbounded && (convertedEntries.length > MAX_KIRO_TOOL_COUNT
    +    || serializedToolCatalogBytes(convertedEntries.map(entry => entry.converted)) > MAX_KIRO_TOOL_CATALOG_BYTES);
       const candidates = exceedsBudget
         ? convertedEntries.toSorted((a, b) => boundedCatalogPriority(a.tool) - boundedCatalogPriority(b.tool) || a.index - b.index)
         : convertedEntries;
    @@ -241,8 +252,9 @@ export function convertKiroToolContext(
         // subtracting a standalone size would misjudge it by the separators JSON adds between entries.
         const projected = reserved ? [...filled, entry.converted, reserved.converted] : [...filled, entry.converted];
         if (
    -      projected.length > MAX_KIRO_TOOL_COUNT
    -      || serializedToolCatalogBytes(projected) > MAX_KIRO_TOOL_CATALOG_BYTES
    +      !unbounded
    +      && (projected.length > MAX_KIRO_TOOL_COUNT
    +        || serializedToolCatalogBytes(projected) > MAX_KIRO_TOOL_CATALOG_BYTES)
         ) break;
         filled.push(entry.converted);
         admitted.add(entry.index);
    diff --git a/src/adapters/kiro/payload.ts b/src/adapters/kiro/payload.ts
    index f3221ed..9258740 100644
    --- a/src/adapters/kiro/payload.ts
    +++ b/src/adapters/kiro/payload.ts
    @@ -199,8 +199,9 @@ export function buildKiroPayload(
         : undefined;
       // A tool-free structured-output turn advertises only its output channel. The catalog nudge is a
       // work-tool contract (shell, file search, result counting) and would describe tools that do not
    -  // exist, so it is reserved for turns that carry real tools.
    -  const toolCatalogNudge = structuredOutput && ordinaryTools.length === 0
    +  // exist, so it is reserved for turns that carry real tools. Claude Code and Claude Desktop send
    +  // their own tool rules with the full catalog, so the Codex-oriented nudge only repeats it.
    +  const toolCatalogNudge = (structuredOutput && ordinaryTools.length === 0) || parsed._anthropicInbound
         ? undefined
         : buildNonOpenAIToolCatalogNudgeFromNames(
           kiroToolWireNames(kiroTools),
    diff --git a/src/adapters/kiro/reasoning.ts b/src/adapters/kiro/reasoning.ts
    index c8f865b..a1923df 100644
    --- a/src/adapters/kiro/reasoning.ts
    +++ b/src/adapters/kiro/reasoning.ts
    @@ -30,9 +30,17 @@ export const KIRO_NATIVE_EFFORT_FIELDS: Record<string, "reasoning" | "output_con
       "gpt-6.1-sol": "reasoning",
       // 261027 preemptive: GPT-6.1 Terra (mirrors GPT-6.1 Sol; see kiro-models.ts).
       "gpt-6.1-terra": "reasoning",
    +  // Claude models whose output_config.effort was accepted by a live probe on 2026-11-07, at every
    +  // rung except xhigh on the 4.6 pair. Haiku 4.5, Opus 4.5 and Sonnet 4.5 reject the field (HTTP 400).
       "claude-opus-5": "output_config",
    -  // 260923 preemptive (see kiro-models.ts): same Claude-specific field as Opus 5.
       "claude-opus-5.5": "output_config",
    +  "claude-opus-4.8": "output_config",
    +  "claude-opus-4.7": "output_config",
    +  "claude-opus-4.6": "output_config",
    +  "claude-sonnet-5.5": "output_config",
    +  "claude-sonnet-5": "output_config",
    +  "claude-sonnet-4.6": "output_config",
    +  "claude-haiku-5.5": "output_config",
     };
     
     export const KIRO_NATIVE_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
    @@ -40,6 +48,8 @@ export const KIRO_NATIVE_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
     // The newly enabled models have evidence for these rungs only. Keep the previous
     // emulation for xhigh, and never widen their native wire when the shared ladder grows.
     const KIRO_LUNA_TERRA_NATIVE_EFFORTS = new Set(["low", "medium", "high", "max"]);
    +// Kiro rejects a native xhigh for these two (HTTP 400, live probe 2026-11-07); it stays emulated.
    +const KIRO_NO_XHIGH_NATIVE_MODELS = new Set(["claude-opus-4.6", "claude-sonnet-4.6"]);
     
     export function kiroNativeEffortField(
       modelId: string,
    @@ -48,6 +58,7 @@ export function kiroNativeEffortField(
       const model = normalizeKiroModelId(modelId);
       if ((model === "gpt-5.6-luna" || model === "gpt-5.6-terra")
         && effort !== undefined && !KIRO_LUNA_TERRA_NATIVE_EFFORTS.has(effort)) return undefined;
    +  if (KIRO_NO_XHIGH_NATIVE_MODELS.has(model) && effort === "xhigh") return undefined;
       return KIRO_NATIVE_EFFORT_FIELDS[model];
     }
     
    diff --git a/src/providers/kiro-models.ts b/src/providers/kiro-models.ts
    index a940e09..38ea0fc 100644
    --- a/src/providers/kiro-models.ts
    +++ b/src/providers/kiro-models.ts
    @@ -12,12 +12,10 @@ export const KIRO_MODELS = [
       "gpt-6.1-sol",
       // 261027 preemptive: GPT-6.1 Terra (mirrors Kiro's GPT-6.1 Sol seed; provider listing unverified).
       "gpt-6.1-terra",
    -  // 260929 preemptive: Claude Sonnet 5.5 added ahead of Kiro's catalog (kiro.dev did not list it on
    -  // 2026-09-29). Mirrors claude-sonnet-5; calls fail upstream until Kiro ships the model.
    +  // Listed on kiro.dev/docs/models (2026-10-24).
       "claude-sonnet-5.5",
       "claude-sonnet-5",
    -  // 260923 preemptive: Claude Opus 5.5 added ahead of Kiro's catalog (kiro.dev did not list it on
    -  // 2026-09-23). Mirrors claude-opus-5; calls fail upstream until Kiro ships the model.
    +  // Listed on kiro.dev/docs/models (2026-10-24).
       "claude-opus-5.5",
       "claude-opus-5",
       "claude-opus-4.8",
    @@ -27,7 +25,7 @@ export const KIRO_MODELS = [
       "claude-sonnet-4.6",
       "claude-sonnet-4.5",
       "claude-sonnet-4.0",
    -  // 261008 preemptive: Haiku 5.5; calls fail upstream until Kiro ships it.
    +  // Listed on kiro.dev/docs/models (2026-10-24); two-tier pricing above 100K input tokens.
       "claude-haiku-5.5",
       "claude-haiku-4.5",
       "deepseek-3.2",
    diff --git a/src/server/responses/request-prepare.ts b/src/server/responses/request-prepare.ts
    index ebda9c6..6cb70c5 100644
    --- a/src/server/responses/request-prepare.ts
    +++ b/src/server/responses/request-prepare.ts
    @@ -517,6 +517,7 @@ export async function prepareResponsesRequest(
           parsed._anthropicServerTools = options.anthropicServerTools;
           parsed._anthropicServerReplay = options.anthropicServerReplay;
           parsed._anthropicSystemCachePrefix = options.anthropicSystemCachePrefix;
    +      parsed._anthropicInbound = true;
           if (parsed.options.textFormat?.type === "json_schema") parsed._structuredOutputConformance = true;
         }
         parsed._promptCacheKeyIsSharedCohort = options.promptCacheKeyIsSharedCohort;
    diff --git a/src/types/request.ts b/src/types/request.ts
    index cd6ddff..91b291c 100644
    --- a/src/types/request.ts
    +++ b/src/types/request.ts
    @@ -91,6 +91,8 @@ export interface OcxParsedRequest {
        * adapter ends a system block there so the breakpoint stays off the per-turn tail.
        */
       _anthropicSystemCachePrefix?: string;
    +  /** The request arrived on the Anthropic Messages surface (Claude Code, Claude Desktop). */
    +  _anthropicInbound?: boolean;
       /**
        * Boundary between replayed history and this turn's newly appended input. Usually the
        * items the proxy restored from local previous_response_id state; also set when the
    diff --git a/tests/providers/kiro/kiro-adapter.test.ts b/tests/providers/kiro/kiro-adapter.test.ts
    index aee5513..33f0739 100644
    --- a/tests/providers/kiro/kiro-adapter.test.ts
    +++ b/tests/providers/kiro/kiro-adapter.test.ts
    @@ -14,7 +14,7 @@ import {
       KIRO_TOOL_RESULT_CARRIER_MESSAGE,
     } from "../../../src/adapters/kiro-constants";
     import { EMPTY_EXEC_OUTPUT_MESSAGE, FAILED_EXEC_OUTPUT_MESSAGE } from "../../../src/adapters/exec-tool-result-normalize";
    -import { MAX_KIRO_TOOL_CATALOG_BYTES, MAX_KIRO_TOOL_COUNT } from "../../../src/adapters/kiro-tools";
    +import { KIRO_TOOL_BUDGET_ENV, KIRO_TOOL_DESCRIPTION_LIMIT_ENV, MAX_KIRO_TOOL_CATALOG_BYTES, MAX_KIRO_TOOL_COUNT } from "../../../src/adapters/kiro-tools";
     import { applyProviderConfigHints, buildCatalogEntries } from "../../../src/codex/catalog";
     import { getValidAccessTokenSnapshot } from "../../../src/oauth";
     import { saveCredential } from "../../../src/oauth/store";
    @@ -784,7 +784,7 @@ describe("kiro adapter — buildRequest", () => {
           },
         };
         const { body } = await createKiroAdapter(provider).buildRequest(
    -      parsedWith([{ role: "user", content: "hi" }], [{ name: "bash", description: "Run command", parameters }]),
    +      parsedWith([{ role: "user", content: "hi" }], [{ name: "bash", description: "Run command", parameters }], "gpt-5.6-sol"),
         );
         const schema = JSON.parse(body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.inputSchema.json;
     
    @@ -811,7 +811,7 @@ describe("kiro adapter — buildRequest", () => {
           required: ["filename", "note"],
         };
         const { body } = await createKiroAdapter(provider).buildRequest(
    -      parsedWith([{ role: "user", content: "hi" }], [{ name: "memories__add_ad_hoc_note", description: "Remember", parameters }]),
    +      parsedWith([{ role: "user", content: "hi" }], [{ name: "memories__add_ad_hoc_note", description: "Remember", parameters }], "gpt-5.6-sol"),
         );
         const schema = JSON.parse(body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.inputSchema.json;
     
    @@ -845,7 +845,7 @@ describe("kiro adapter — buildRequest", () => {
           required: ["target", "message"],
         };
         const { body } = await createKiroAdapter(provider).buildRequest(
    -      parsedWith([{ role: "user", content: "hi" }], [{ name: "followup_task", namespace: "collaboration", description: "Send follow-up", parameters }]),
    +      parsedWith([{ role: "user", content: "hi" }], [{ name: "followup_task", namespace: "collaboration", description: "Send follow-up", parameters }], "gpt-5.6-sol"),
         );
         const schema = JSON.parse(body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.inputSchema.json;
     
    @@ -867,7 +867,7 @@ describe("kiro adapter — buildRequest", () => {
           $defs: { Inner: { type: "object", properties: { id: { type: "string" } } } },
         };
         const { body } = await createKiroAdapter(provider).buildRequest(
    -      parsedWith([{ role: "user", content: "hi" }], [{ name: "memories__read", description: "Read", parameters }]),
    +      parsedWith([{ role: "user", content: "hi" }], [{ name: "memories__read", description: "Read", parameters }], "gpt-5.6-sol"),
         );
         const schema = JSON.parse(body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.inputSchema.json;
     
    @@ -954,7 +954,7 @@ describe("kiro adapter — buildRequest", () => {
       test("root composition preserves root properties/siblings and merges coexisting keywords", async () => {
         const pick = async (schema: unknown) =>
           JSON.parse((await createKiroAdapter(provider).buildRequest(
    -        parsedWith([{ role: "user", content: "hi" }], [{ name: "comp2", description: "d", parameters: schema }]),
    +        parsedWith([{ role: "user", content: "hi" }], [{ name: "comp2", description: "d", parameters: schema }], "gpt-5.6-sol"),
           )).body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.inputSchema.json;
     
         // Root direct properties/required AND a sibling oneOf: keep the root fields, merge the variant.
    @@ -1660,7 +1660,7 @@ describe("kiro adapter — native and emulated reasoning effort", () => {
       test("mid-turn steering reaches Kiro identically for opus-5 and opus-4.8", async () => {
         // The #543 reporter observed opus-4.8 honoring mid-turn steers while opus-5 ignored them on
         // the same proxy build. Pin that our request construction does not differ between the two
    -    // beyond model identity and opus-5's native effort field, so a future model-conditional
    +    // beyond model identity and the native effort field both now carry, so a future model-conditional
         // regression on this path is caught here rather than in a user's session.
         const steer = "Stop and switch approach now.";
         const messages = [
    @@ -1686,10 +1686,9 @@ describe("kiro adapter — native and emulated reasoning effort", () => {
             { content: [{ text: "out" }], status: "success", toolUseId: "call-1" },
           ]);
         }
    -    // Only the native-effort field may differ; opus-4.8 also gets no emulated thinking tags
    -    // here because tool-result turns skip that injection.
    +    // Both carry the same native effort field, and neither gets emulated thinking tags.
         expect(opus5.additionalModelRequestFields).toEqual({ output_config: { effort: "high" } });
    -    expect(opus48.additionalModelRequestFields).toBeUndefined();
    +    expect(opus48.additionalModelRequestFields).toEqual({ output_config: { effort: "high" } });
         expect(opus48.conversationState.currentMessage.userInputMessage.content).not.toContain("<thinking_mode>");
       });
     
    @@ -1721,7 +1720,7 @@ describe("kiro adapter — native and emulated reasoning effort", () => {
       });
     
       test("native-effort models reject efforts Kiro does not accept", async () => {
    -    for (const modelId of ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-sol", "gpt-6-luna", "claude-opus-5", "claude-opus-5.5"]) {
    +    for (const modelId of ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-sol", "gpt-6-luna", "claude-opus-5", "claude-opus-5.5", "claude-sonnet-5.5", "claude-opus-4.6", "claude-haiku-5.5"]) {
           await expect(createKiroAdapter(provider).buildRequest({
             ...parsedWith([{ role: "user", content: "solve" }], undefined, modelId),
             options: { reasoning: "minimal" },
    @@ -2025,3 +2024,166 @@ describe("kiro code-mode exec survives the catalog budget", () => {
         expect(serializedBytes).toBeLessThanOrEqual(MAX_KIRO_TOOL_CATALOG_BYTES);
       });
     });
    +
    +describe("kiro catalog budget opt-out", () => {
    +  const origBudget = process.env[KIRO_TOOL_BUDGET_ENV];
    +  afterEach(() => {
    +    if (origBudget === undefined) delete process.env[KIRO_TOOL_BUDGET_ENV];
    +    else process.env[KIRO_TOOL_BUDGET_ENV] = origBudget;
    +  });
    +
    +  // Claude Desktop declares its own tools last, so a budgeted catalog drops them first.
    +  const catalog = [
    +    ...Array.from({ length: MAX_KIRO_TOOL_COUNT + 60 }, (_, index) => ({
    +      name: `mcp__filler__tool_${String(index).padStart(3, "0")}`,
    +      description: `Filler ${index} ${"x".repeat(900)}`,
    +      parameters: { type: "object", properties: { value: { type: "string", description: "y".repeat(200) } } },
    +    })),
    +    { name: "mcp__ccd_turn__update_plan", description: "Update the plan", parameters: { type: "object" } },
    +    { name: "mcp__ccd_turn__wrap_up", description: "Wrap up the turn", parameters: { type: "object" } },
    +  ];
    +
    +  async function emitted(): Promise<{ names: string[]; content: string }> {
    +    const { body } = await createKiroAdapter(provider).buildRequest(parsedWith([{ role: "user", content: "hi" }], catalog));
    +    const current = JSON.parse(body).conversationState.currentMessage.userInputMessage;
    +    return {
    +      names: current.userInputMessageContext.tools.slice(0, -1).map((tool: { toolSpecification: { name: string } }) => tool.toolSpecification.name),
    +      content: current.content,
    +    };
    +  }
    +
    +  test("default keeps both budgets and drops the last-declared tools", async () => {
    +    delete process.env[KIRO_TOOL_BUDGET_ENV];
    +    const { names, content } = await emitted();
    +
    +    expect(names.length).toBeLessThanOrEqual(MAX_KIRO_TOOL_COUNT);
    +    expect(names).not.toContain("mcp__ccd_turn__wrap_up");
    +    expect(content).toContain("Kiro's outbound catalog budget allows");
    +  });
    +
    +  test("off sends the whole catalog in declared order without a notice", async () => {
    +    process.env[KIRO_TOOL_BUDGET_ENV] = "off";
    +    const { names, content } = await emitted();
    +
    +    expect(new TextEncoder().encode(JSON.stringify(catalog)).byteLength).toBeGreaterThan(MAX_KIRO_TOOL_CATALOG_BYTES);
    +    expect(names).toEqual(catalog.map(tool => tool.name));
    +    expect(content).not.toContain("Kiro's outbound catalog budget allows");
    +  });
    +
    +  test("any other value keeps the budget", async () => {
    +    process.env[KIRO_TOOL_BUDGET_ENV] = "0";
    +    const { names } = await emitted();
    +
    +    expect(names.length).toBeLessThanOrEqual(MAX_KIRO_TOOL_COUNT);
    +  });
    +});
    +
    +describe("kiro tool description limit opt-out", () => {
    +  const origLimit = process.env[KIRO_TOOL_DESCRIPTION_LIMIT_ENV];
    +  afterEach(() => {
    +    if (origLimit === undefined) delete process.env[KIRO_TOOL_DESCRIPTION_LIMIT_ENV];
    +    else process.env[KIRO_TOOL_DESCRIPTION_LIMIT_ENV] = origLimit;
    +  });
    +
    +  const longDescription = `Long docs ${"x".repeat(5_000)} keep this tail.`;
    +
    +  async function emittedDescription(modelId?: string): Promise<string> {
    +    const { body } = await createKiroAdapter(provider).buildRequest(
    +      parsedWith([{ role: "user", content: "hi" }], [{ name: "longtool", description: longDescription, parameters: { type: "object" } }], modelId),
    +    );
    +    return JSON.parse(body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.description;
    +  }
    +
    +  test("default keeps the 1024-character cap", async () => {
    +    delete process.env[KIRO_TOOL_DESCRIPTION_LIMIT_ENV];
    +
    +    expect(await emittedDescription()).toHaveLength(1024);
    +  });
    +
    +  test("off sends every description whole, whatever the model", async () => {
    +    process.env[KIRO_TOOL_DESCRIPTION_LIMIT_ENV] = "off";
    +
    +    expect(await emittedDescription()).toBe(longDescription);
    +    expect(await emittedDescription("gpt-5.6-sol")).toBe(longDescription);
    +  });
    +
    +  test("any other value keeps the cap", async () => {
    +    process.env[KIRO_TOOL_DESCRIPTION_LIMIT_ENV] = "0";
    +
    +    expect(await emittedDescription()).toHaveLength(1024);
    +  });
    +});
    +
    +describe("kiro tool-catalog nudge and the Anthropic Messages surface", () => {
    +  // Claude Code and Claude Desktop send their own tool rules with the full catalog; the
    +  // Codex-oriented nudge (neighbour-tool bans, code-mode guidance) only repeats it.
    +  async function currentContent(anthropicInbound: boolean): Promise<string> {
    +    const parsed = parsedWith([{ role: "user", content: "hi" }], [bashTool]);
    +    if (anthropicInbound) parsed._anthropicInbound = true;
    +    const { body } = await createKiroAdapter(provider).buildRequest(parsed);
    +    return JSON.parse(body).conversationState.currentMessage.userInputMessage.content;
    +  }
    +
    +  test("a Codex request keeps the nudge", async () => {
    +    expect(await currentContent(false)).toContain("Tool contract: use the current tool catalog as ground truth.");
    +  });
    +
    +  test("a Claude request drops the nudge and keeps the completion contract", async () => {
    +    const content = await currentContent(true);
    +
    +    expect(content).not.toContain("Tool contract:");
    +    expect(content).not.toContain("neighboring-agent tool names");
    +    expect(content).toContain("call codex_kiro_final_answer exactly once");
    +  });
    +});
    +
    +describe("kiro tool schemas by model family", () => {
    +  // Live probe on 2026-11-07: Claude models on Kiro accept every JSON Schema keyword the
    +  // sanitizer used to strip, so the constraints reach the model. Other families keep the strip.
    +  const constrained = {
    +    $schema: "http://json-schema.org/draft-07/schema#",
    +    type: "object",
    +    additionalProperties: false,
    +    properties: {
    +      city: { type: "string", pattern: "^[A-Z][a-z]+$", maxLength: 20, format: "hostname" },
    +      days: { type: "integer", minimum: 1, maximum: 7 },
    +      tags: { type: "array", items: { type: "string" }, maxItems: 3, uniqueItems: true },
    +    },
    +    required: ["city", "days"],
    +  };
    +
    +  async function emittedSchema(modelId: string): Promise<Record<string, any>> {
    +    const { body } = await createKiroAdapter(provider).buildRequest(
    +      parsedWith([{ role: "user", content: "hi" }], [{ name: "forecast", description: "Forecast", parameters: constrained }], modelId),
    +    );
    +    return JSON.parse(body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.inputSchema.json;
    +  }
    +
    +  test("a Claude model receives the schema with every constraint", async () => {
    +    for (const modelId of ["claude-opus-5.5", "claude-sonnet-5.5", "claude-haiku-5.5", "claude-opus-4.5"]) {
    +      expect(await emittedSchema(modelId)).toEqual(constrained);
    +    }
    +  });
    +
    +  test("a non-Claude model still receives the stripped schema", async () => {
    +    const schema = await emittedSchema("gpt-5.6-sol");
    +    expect(schema.$schema).toBeUndefined();
    +    expect(schema.additionalProperties).toBeUndefined();
    +    expect(schema.properties.city).toEqual({ type: "string" });
    +    expect(schema.properties.days).toEqual({ type: "integer" });
    +    expect(schema.properties.tags).toEqual({ type: "array", items: { type: "string" } });
    +    expect(schema.required).toEqual(["city", "days"]);
    +  });
    +
    +  test("a Claude root composition is still flattened to an object", async () => {
    +    const { body } = await createKiroAdapter(provider).buildRequest(
    +      parsedWith([{ role: "user", content: "hi" }], [{
    +        name: "either", description: "Either", parameters: { oneOf: [{ type: "object", properties: { a: { type: "string", maxLength: 3 } } }] },
    +      }], "claude-opus-5.5"),
    +    );
    +    const schema = JSON.parse(body).conversationState.currentMessage.userInputMessage.userInputMessageContext.tools[0].toolSpecification.inputSchema.json;
    +    expect(schema.type).toBe("object");
    +    expect(schema.oneOf).toBeUndefined();
    +    expect(schema.properties.a).toEqual({ type: "string", maxLength: 3 });
    +  });
    +});
    diff --git a/tests/providers/kiro/kiro-reasoning-roundtrip.test.ts b/tests/providers/kiro/kiro-reasoning-roundtrip.test.ts
    index 7eb45b4..28c53fc 100644
    --- a/tests/providers/kiro/kiro-reasoning-roundtrip.test.ts
    +++ b/tests/providers/kiro/kiro-reasoning-roundtrip.test.ts
    @@ -300,3 +300,52 @@ describe("kiro native reasoning effort — the GPT-5.6 family", () => {
           .toEqual({ output_config: { effort: "xhigh" } });
       });
     });
    +
    +// Live probe on 2026-11-07: Kiro accepted output_config.effort at every rung for these Claude
    +// models except xhigh on the 4.6 pair, and rejected it (HTTP 400) for Haiku 4.5, Opus 4.5 and Sonnet 4.5.
    +describe("kiro native reasoning effort — probed Claude models", () => {
    +  function wireBody(modelId: string, effort: string): Record<string, unknown> {
    +    const parsed = {
    +      modelId,
    +      stream: true,
    +      options: { reasoning: effort, maxOutputTokens: 1000 },
    +      context: { messages: [{ role: "user", content: "solve" }] },
    +    } as unknown as Parameters<typeof buildKiroPayload>[0];
    +    return buildKiroPayload(parsed, undefined, "disabled", "ide").payload;
    +  }
    +  const content = (body: Record<string, unknown>) => (body.conversationState as {
    +    currentMessage: { userInputMessage: { content: string } };
    +  }).currentMessage.userInputMessage.content;
    +  const RUNGS = ["low", "medium", "high", "xhigh", "max"];
    +  const NATIVE: Record<string, string[]> = {
    +    "claude-opus-5.5": RUNGS, "claude-opus-5": RUNGS, "claude-opus-4.8": RUNGS, "claude-opus-4.7": RUNGS,
    +    "claude-sonnet-5.5": RUNGS, "claude-sonnet-5": RUNGS, "claude-haiku-5.5": RUNGS,
    +    "claude-opus-4.6": ["low", "medium", "high", "max"], "claude-sonnet-4.6": ["low", "medium", "high", "max"],
    +  };
    +
    +  for (const [modelId, efforts] of Object.entries(NATIVE)) {
    +    test(`${modelId} sends its accepted rungs natively, with no thinking tags`, () => {
    +      for (const effort of efforts) {
    +        const body = wireBody(modelId, effort);
    +        expect(body.additionalModelRequestFields).toEqual({ output_config: { effort } });
    +        expect(content(body)).toBe("solve");
    +      }
    +    });
    +  }
    +
    +  test("xhigh on the 4.6 pair stays emulated", () => {
    +    for (const modelId of ["claude-opus-4.6", "claude-sonnet-4.6"]) {
    +      const body = wireBody(modelId, "xhigh");
    +      expect(body.additionalModelRequestFields).toBeUndefined();
    +      expect(content(body)).toContain("<thinking_mode>enabled</thinking_mode>");
    +    }
    +  });
    +
    +  test("models that rejected the native field stay emulated", () => {
    +    for (const modelId of ["claude-haiku-4.5", "claude-opus-4.5", "claude-sonnet-4.5"]) {
    +      const body = wireBody(modelId, "high");
    +      expect(body.additionalModelRequestFields).toBeUndefined();
    +      expect(content(body)).toContain("<thinking_mode>enabled</thinking_mode>");
    +    }
    +  });
    +});
    diff --git a/tests/server/server-kiro-structured-output-e2e.test.ts b/tests/server/server-kiro-structured-output-e2e.test.ts
    index 7421290..0712b44 100644
    --- a/tests/server/server-kiro-structured-output-e2e.test.ts
    +++ b/tests/server/server-kiro-structured-output-e2e.test.ts
    @@ -253,3 +253,44 @@ describe("Kiro holds a Messages schema to full conformance", () => {
         });
       });
     });
    +
    +describe("Kiro tool-catalog nudge by inbound surface", () => {
    +  const completionFrames = (answer: string): Uint8Array[] => [
    +    eventFrame("toolUseEvent", { name: KIRO_COMPLETION_TOOL_NAME, toolUseId: "done-1" }),
    +    eventFrame("toolUseEvent", { name: KIRO_COMPLETION_TOOL_NAME, toolUseId: "done-1", input: JSON.stringify({ answer }) }),
    +    eventFrame("toolUseEvent", { name: KIRO_COMPLETION_TOOL_NAME, toolUseId: "done-1", stop: true }),
    +  ];
    +  const sentContent = (request: Record<string, any>): string =>
    +    request.conversationState.currentMessage.userInputMessage.content as string;
    +  const lookupTool = { name: "lookup", description: "Look something up", input_schema: { type: "object", properties: { q: { type: "string" } } } };
    +
    +  test("/v1/messages reaches Kiro without the nudge but with the completion contract", async () => {
    +    await withProxy([completionFrames("Ready.")], async (url, requests) => {
    +      const response = await post(url, "/v1/messages", {
    +        model: "kiro-test/claude-opus-5.5",
    +        max_tokens: 1024,
    +        tools: [lookupTool],
    +        messages: [{ role: "user", content: "Say ready." }],
    +      });
    +      expect(response.status, await response.text()).toBe(200);
    +      expect(requests).toHaveLength(1);
    +      expect(advertisedTools(requests[0]!)).toEqual(["lookup", KIRO_COMPLETION_TOOL_NAME]);
    +      expect(sentContent(requests[0]!)).not.toContain("Tool contract:");
    +      expect(sentContent(requests[0]!)).toContain(`call ${KIRO_COMPLETION_TOOL_NAME} exactly once`);
    +    });
    +  });
    +
    +  test("/v1/responses keeps the nudge for Codex", async () => {
    +    await withProxy([completionFrames("Ready.")], async (url, requests) => {
    +      const response = await post(url, "/v1/responses", {
    +        model: "kiro-test/claude-opus-5.5",
    +        stream: false,
    +        tools: [{ type: "function", name: "lookup", description: "Look something up", parameters: { type: "object", properties: { q: { type: "string" } } } }],
    +        input: [{ role: "user", content: "Say ready." }],
    +      });
    +      expect(response.status, await response.text()).toBe(200);
    +      expect(requests).toHaveLength(1);
    +      expect(sentContent(requests[0]!)).toContain("Tool contract: use the current tool catalog as ground truth.");
    +    });
    +  });
    +});
  3. Ingwannu commented on Nov 8, 2026

    @Ingwannu
    Owner

    Triage note against dev (f8dfc2f). The current limits are deliberate, not stale:

    • The 48-tool and 96 KB budget (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.
    • Schema keywords are stripped because Kiro's validator rejected them (kiro-tools.ts:15-19 and the KIRO_REJECTED_SCHEMA_KEYS set at :20-56). A Claude-only bypass needs an accepted probe that includes maxLength, pattern and the other stripped keywords.
    • output_config.effort is sent only for claude-opus-5 and claude-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 in ListAvailableModels is 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 as mcp__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 the mcp__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.effort on the non-Opus model you want to use.

  4. added
    needs-info
    on Nov 8, 2026
  5. svc-aibot-363 commented on Nov 9, 2026

    @svc-aibot-363
    ContributorAuthor

    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:

    • Position of mcp__ccd_turn__*: Claude Desktop declares 118 client tools today. mcp__ccd_turn__update_plan and mcp__ccd_turn__wrap_up are 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 with OCX_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.
    • (a) full catalog, (b) stripped constraints, (c) output_config.effort on 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, and pattern / maximum honoured 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 except xhigh, rejected on the 4.5 models, which stay emulated.
  6. lidge-jun commented on Nov 15, 2026

    @lidge-jun
    Owner

    #8451 landed on dev (44efa74) and covers the five request changes reported here. Kiro Claude models now receive native output_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 with OCX_KIRO_TOOL_BUDGET=off and OCX_KIRO_TOOL_DESCRIPTION_LIMIT=off. The default budget is unchanged because of #719. One gap remains under that default: same-priority client tools such as mcp__ccd_turn__update_plan are 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolcatalogneeds-infoproviderprovider-compatibility

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions