mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 07:47:29 +00:00
[GH-ISSUE #3654] [Bug] Default MCP catalog fails every Kimi Code prompt on Moonshot models (per-tool parameters schema cap) #1373
Closed
opened 2026-10-16 21:04:47 +00:00 by bsakaguchi
·
2 comments
No Branch/Tag specified
main
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/procedure-reference-stacked
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#1373
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Sicaduj on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3654
Before submitting
Area
MCP or agent integration
Observed behavior
With REA registered as an MCP server in Kimi Code, every prompt fails on Kimi
models (
k3,k3-256k), including prompts that never call a REA tool. Othermodels in the same CLI (DeepSeek, Xiaomi) work, so the failure depends only on
the attached tool catalog.
Exact error, every time:
The registration was written for Kimi Code without any input-schema profile, so
the server advertised its default (
full) catalog. Measuring the advertisedcatalog directly (no model API involved) with
initialize+tools/listoverstdio JSON-RPC against the same server/spawn environment:
parametersschemainputSchemabytesfull)compare_web_captures)REA_MCP_INPUT_SCHEMA_PROFILE=compactREA's own recorded measurements for this provider cap are ~13.7 KB accepted /
~15 KB rejected (
src/config/mcpInputSchemaProfile.ts:6-11), so the defaultadvertisement cannot be accepted by the client's own models.
Reproduction
Register REA for Kimi Code — either by
rea setup --client kimi(whichselects no input-schema profile) or by hand with the same shape — in
~/.kimi-code/mcp.json:Start a new Kimi Code session and select a Kimi model (
k3ork3-256k).Send any prompt, e.g.
hi. It fails with the 400 above.Frequency: every prompt attempted failed (no successful prompt observed);
no target opened and no REA tool invoked.
Measure the advertised catalog without a model API — spawn the same server
and print
Buffer.byteLength(JSON.stringify(tool.inputSchema))fortools/list(initialize→notifications/initialized→tools/list).Result: the table under Observed behavior.
Control: add
"REA_MCP_INPUT_SCHEMA_PROFILE": "compact"to thatenv,restart the session — prompts succeed, and the same probe reports max
3,520 B with 0 tools over the budget.
Expected behavior
REA already documents this exact failure and its mitigation:
docs/mcp-contracts.md→ Compact input schema profile states that "Moonshotclients such as kimi-cli fail every request while the default catalog is
attached (#1484)" and that
REA_MCP_INPUT_SCHEMA_PROFILE=compactrenders everyadvertised schema within a 13,312-byte budget.
rea setup --client kimiwritesthe registration for the client whose models are Moonshot's, but selects no
profile, so the documented-for-Kimi failure is the default outcome. Expected:
a registration written by setup for Kimi Code is usable with that client's own
models (or setup/doctor surfaces the conflict), and
rea doctor --client kimidoes not report such a registration as healthy while no request can succeed.
Unverified expectation: I did not test other Kimi Code releases or other
size-capped gateways.
Impact and scope
to REA workflows — the catalog is attached to unrelated prompts.
REA logs or results. The only output is the provider 400, which reads like a
client/model fault and is otherwise indistinguishable from a Kimi-side
regression.
opened and no tool executes. Other models in the same CLI and clients that do
not enforce the cap are unaffected.
other size-capped gateways (WorkBuddy/CodeBuddy, see #2999).
REA version
rea --version→6.5.0; source revision3b79af28e(main, workspace build launched throughscripts/rea.mjs mcp).Runtime and platform
Node.js 24.20.0 (npm 11.19.0); Windows 11 x64; Kimi Code CLI 2.2.0 as the MCP host. Ghidra 12.1.4 is configured (
REA_ANALYSIS_PROVIDER=ghidra), but no provider was involved in the failure.Target and artifact context
Not applicable — the request is rejected before any tool call, with no target opened.
Interface
MCP
Earliest failure stage
Request parsing or validation
Relevant output or evidence
Command / request actually run:
Relevant result, error, or artifact:
400 tools.function.parameters is not a valid moonshot flavored json schema, details: <At path 'root': schema exceeds maximum allowed size>.compare_web_captures154,738 B;compare_application_versions28,495 B;evaluate_reconstruction_coverage24,267 B;inspect_analysis_view21,691 B;project_managed_application_graph20,871 B;build_reconstruction_obligation_ledger20,742 B. 12 tools exceed 15 KB.rea doctor --client kimiagainst that registration reported statestale(for its custom
startupTimeoutMs/toolTimeoutMs) and reported nothing aboutthe advertised schema profile.
Source reference for the missing default:
src/application/SetupClientConfiguration.ts(the
client.name === "kimi"branch) adds only startup/tool timeouts andprovider environment; the profile setting is never written for any client.
Missing evidence or remaining uncertainty: the last known good and first known
bad REA versions are
NOT_ENOUGH_INFO— see Additional context.Typed outcome or recovery expected
A Kimi Code registration should advertise a catalog the client's models accept,
or the mismatch should be reportable from REA. Ideally
rea doctor/rea mcp doctoralso reports the active input-schema profile, the largestadvertised schema, and the tools above the provider cap, so an opaque provider
400 becomes a named REA-side cause instead of an unexplained turn interruption.
Analysis or suspected cause
Source-derived, grounded in REA's own recorded evidence:
parametersschemaexceeds a literal serialized size cap; REA records ~13.7 KB accepted / ~15 KB
rejected (
src/config/mcpInputSchemaProfile.ts:6-11,docs/mcp-contracts.md→ Compact input schema profile).is rejected before REA participates. Hypothesis for the trigger: whichever
release introduced the largest contracts (their
git logdates span2026-07-14 … 2026-10-13) pushed the catalog past the cap; I did not test a
known-good revision, so this is a hypothesis, not an observation.
REA_MCP_INPUT_SCHEMA_PROFILE=compact,#1514/#1580), but it is opt-in,
fullremains the documented default, andonly the Claude Code and Copilot sections of
docs/client-configuration.mdtell users to add it — the Kimi Code section does not. Proposal (a maintainer
decision, not a required fix): register
compactfor Kimi Code unless thecaller already selected a profile, since Kimi Code's models are Moonshot's.
registrationAligned(
src/application/ClientRegistrationStatus.ts) validates command identity,transport and timeouts but not
envvalues, and the environment map is onlyvalidated as a string record, so a Kimi Code registration that omits the
profile is reported as aligned/healthy.
Additional context
Related issues: #1484 (measured cap evidence), #1580, #1514 (compact input
schema profile), #2999 (WorkBuddy/CodeBuddy gateway
11133).Regression boundary: last known good versions is
6.0. The reporter noticed the failure after a recent REA update;the catalog is now 207 tools / 688,973 B of input schemas, while
docs/client-configuration.mdrecords an earlier measurement of 172 tools /~496 KB at revision
04089d5be.Workaround applied locally (not a tested fix): adding
"REA_MCP_INPUT_SCHEMA_PROFILE": "compact"to the existing registration'senvby hand, rather than re-running
rea setup --client kimi, because setup alsonormalizes that registration's custom timeouts (
startupTimeoutMs60000 → 30000and
toolTimeoutMs600000 → 120000, compared againstMCP_STARTUP_POLICYinregistrationAligned).@morluto commented on GitHub (Oct 14, 2026):
Delivered on main in fffb07419.
Kimi setup omitted the compact advertisement already provided for Moonshot schema-size limits. New/refreshed Kimi registrations now select compact when no profile is explicitly stored or supplied; explicit full/compact remains authoritative. Doctor marks omitted-profile Kimi registrations stale, and the Kimi guide explains recovery.
Validation: Public Kimi registration lifecycle/status tests cover defaults, explicit stored choices, override precedence, backups and idempotency. Compact schemas retain canonical server validation and pass dialect/client checks. Live Moonshot behavior is the reported Kimi Code 2.2.0/Windows 11 evidence; no model API was called in this fix. Full exact-revision qualification passed.
@nosmile99 commented on GitHub (Oct 14, 2026):
Reproduced the measurements independently via
initialize+tools/listover stdio against a local build — they match the issue's table exactly: default profile advertises 207 tools, maxinputSchema154,738 B (compare_web_captures), 18 tools over 13 KiB, 688,971 B total;REA_MCP_INPUT_SCHEMA_PROFILE=compactgives max 3,520 B, 0 over 13 KiB, 83,432 B total. The default catalog cannot be accepted by Moonshot's own models, confirmed.Fix approach (verified locally):
rea setup --client kimishould defaultREA_MCP_INPUT_SCHEMA_PROFILE=compactin the registrationenv, without overriding an explicitly configured profile. Implemented inclientConfigurationDesired(src/application/SetupClientConfiguration.ts) — the default applies only when the key is absent, so an explicit"full"in the user'smcp.jsonis preserved, and other clients are untouched.Regression test
src/application/SetupClientConfiguration.test.ts(3 tests: default-to-compact, explicit-profile-preserved, other-clients-untouched): the key test fails on pre-fix code, 3/3 pass post-fix; related setup suites 59/59 green; typecheck + lint clean.Branch with the fix + tests:
nosmile99/rea@fix/kimi-default-compact-input-schema-3654. Per this repo's human-ownership rule I'm not opening the PR myself — the branch is ready for a human owner to declare and file.