mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #4620] [Bug] Gemini CLI throws error 400 'INVALID_ARGUMENT' when using REA skill #2403
Closed
opened 2026-10-17 21:04:12 +00:00 by bsakaguchi
·
21 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
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#2403
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 @ElektroStudios on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4620
Before submitting
Area
MCP or agent integration
Observed behavior
I recently installed REA (Reverse Engineer Anything) alongside its bundled skill file, configured Gemini CLI in REA interface, and ran the following prompt in Gemini CLI:
Use REA to analyze the native binary at C:/_gemini/ReNamer.exe. Your goal is to help me hardcode a dark theme. I need you to look up the import address table (IAT) and locate all references to Win32 API calls related to color drawing: GetSysColor, SetBkColor, SetTextColor, or CreateSolidBrush. Return the pseudocode or assembly of the functions that prepare the graphical user interface (GUI) and give me the offsets (virtual and physical memory addresses) where the color values are passed, so I can patch them with a hex editor. Please execute actions one by one, do not run tools in parallel.Sorry if I can't provide much useful data; this is my first time using Gemini CLI (and my first experience using a CLI AI agent), which I installed specifically to use REA, and I ran straight into this issue.
Reproduction
Steps to Reproduce
C:/_gemini/ReNamer.exe).Expected behavior
I expected Gemini CLI to successfully load REA's MCP server, parse the registered tool definitions, and process my prompts normally without triggering API errors, allowing the agent to execute binary analysis workflows using the provided toolset.
Impact and scope
Frequency: always.
REA version
6.5.0
Runtime and platform
Node 24.16.0; Windows 10.0.19045.5371 x64; Ghidra 12.1.4
Target and artifact context
PE 32-bit (x86) Native Windows Executable, Standard desktop GUI application (compiled in Delphi, utilizing the VCL framework)
Interface
CLI
Earliest failure stage
Unknown
Relevant output or evidence
Error 400 'INVALID_ARGUMENT' (from Gemini CLI)
Typed outcome or recovery expected
No response
Analysis or suspected cause
Here is what the Gemini web interface told me when I brought up this issue about the REA skill file (might be useful):
Additional context
No response
@Nitin13-git commented on GitHub (Oct 16, 2026):
Thanks for the report. This looks like it may be the same problem as #4025 (closed): on
rea-agents@6.5.0, five tools advertise booleanconstvalues (false/true), and Gemini rejects those in function declarations (TYPE_STRINGexpected). The fix isa2e30168aonmain, but it is not in a published release yet (npmlatestis still 6.5.0), so a freshnpm installof 6.5.0 still has the broken schemas.From a stdio
tools/listscan of currentmain(207 tools): no non-stringconstorenum, no$ref/$defs, and nodependentRequired/dependencies. I have not run Gemini CLI, so I can't confirm that this removes your 400.To find out whether it is the same problem or something new, could you paste the full error text from Gemini CLI (not only
400 INVALID_ARGUMENT)? In #4025 the message named the exact path, for exampletools[0].function_declarations[112].parameters.properties[3]..., which identifies the field. Please also include the Gemini CLI version (gemini --version). Redact any key or private path.@XinwangTao commented on GitHub (Oct 17, 2026):
This matches the same root area as #4025: Gemini's API is strict about tool schemas, and once a single malformed schema is present in the 207-tool catalog it can reject the whole request with 400 INVALID_ARGUMENT before any tool call happens. The described error (constant values of non-string type in enum/const fields) is the kind of thing that breaks Gemini's parser at catalog load time, so I'd treat #4025 as the primary fix and this as the user-facing symptom. Beyond the schema fix, a reasonable mitigation is to reduce the catalog surface for providers with tight limits — e.g., only advertise tools after a minimal "what can you do" probe, or group related tools so the initial request carries fewer definitions. ElektroStudios' report is very useful because it documents the exact CLI flow and the impact of the catalog size; having a repro like this will make it much easier to verify the fix actually unblocks Gemini users.
@ElektroStudios commented on GitHub (Oct 17, 2026):
First of all, thank you very much for your support and for looking into this!
Here is the requested information. My Gemini CLI version is: 0.64.0
Client Information
Regarding the exact error path (
tools[0]...), I am unable to provide it because the Gemini CLI does not output thedetailsorfieldViolationsarray, even with "Error Verbosity" set tofullin its settings.This is the absolute maximum output the CLI provides when the 400 error occurs:
Just to isolate the issue: if I disable the REA skill, Gemini CLI works without problems. This may confirm that the error is exclusively triggered by the REA tool schema and is not a general configuration issue on my end.
Let me know if there is a debug flag or environment variable I can use to intercept the raw HTTP response to get that exact path for you.
@XinwangTao commented on GitHub (Oct 17, 2026):
Thanks for the extra data. The fact that Gemini CLI works fine with the REA skill disabled is strong confirmation that the failure is triggered purely by REA's tool catalog, which aligns with the #4025 root cause — the boolean const schemas fixed on main (
a2e30168a) but not yet released.On capturing the exact field path: Gemini CLI does not surface fieldViolations, but you can intercept the raw request before it leaves the machine by running it behind an HTTPS inspection proxy (mitmproxy, HTTP Toolkit, or Fiddler on Windows) with a trusted root cert, then reading the JSON body of the POST to generativelanguage.googleapis.com — the offending field will be listed there. Also worth checking: some Gemini CLI builds support a debug log flag (gemini --help → logging options), which may print the request payload at debug level.
Since npm latest is still 6.5.0, the fastest way to verify the fix is to retest this exact flow once a release containing
a2e30168aships. If the 400 persists after that, the catalog-size mitigation (advertising tools in smaller groups) becomes the likely next step.@XinwangTao commented on GitHub (Oct 17, 2026):
@ElektroStudios A couple of concrete ways to get the exact field without waiting for CLI diagnostics:
Proxy capture: run mitmproxy (or Fiddler/Charles) on 127.0.0.1:8080, set
HTTPS_PROXY=http://127.0.0.1:8080before launchinggemini, install the mitmproxy CA cert, and the failing POST to generativelanguage.googleapis.com will expose the full function_declarations array. That gives Nitin13-git the exacttools[...].function_declarations[...]path even though the CLI hides fieldViolations.Faster than that: verify the fix right now. The #4025 fix (
a2e30168a) is on main but not in the published 6.5.0, so clone the repo,npm ci && npm run build, and point the REA MCP server at that build. If the 400 disappears, this is confirmed as the same root cause; if it persists, the capture from step 1 will pinpoint which schema still breaks Gemini.Your observation that disabling the REA skill makes Gemini CLI work is already strong evidence the 400 originates from the tool catalog itself rather than your config, so narrowing it to the specific schema is mostly about closing the loop for the maintainers.
@ElektroStudios commented on GitHub (Oct 17, 2026):
I went ahead and tested step 2. (To be completely honest, I am not a Node/npm guy, so I used Google Gemini to help me navigate the whole cloning process, bypass the missing Windows binaries by extracting
.nodeandmanifest.jsonfrom the official 6.5.0 tarball, and handle the build/link).After doing all that: I cloned the
mainbranch, successfully bypassed the build errors, rannpm run build:cached, and linked it globally (npm link). Then, I re-ranrea setupto ensure Gemini CLI hooked into this local patched build. (I verified via PowerShell'sGet-Item "$env:APPDATA\npm\node_modules\rea-agents" | Select-Object LinkType, Targetthat the globalrea-agentsnode_module is physically a Junction symlink pointing directly to my local cloned repository, not a cached global install—which I uninstalled beforehand just to be 100% sure).Unfortunately, the result is exactly the same. The
400 Bad Request (INVALID_ARGUMENT)error still persists the moment the prompt is sent.It seems the
a2e3016fix for boolean const schemas is not enough. The Gemini API is still flat-out rejecting the payload, which strongly may point to the depth and complexity of injecting 207 tools into the function calling schema all at once.As you mentioned, it looks like the catalog-size mitigation (advertising tools in smaller groups or lazy-loading them) is definitely the necessary next step. Let me know if you need me to test that implementation once it's drafted!
I also tried your Step 1 to get the exact fieldViolations path for you (using the cloned local repo with your fix). Gemini walked me through the process, but I hit a wall with the tooling itself:
Fiddler proxying fails / does not capture the related CLI traffic (it works fine for processes such as firefox.exe). Maybe I did something wrong or maybe the Gemini CLI's internal fetch seems to completely ignore standard HTTPS_PROXY environment variables.
Even when checking the raw
gemini-client-error-*.jsondebug files dumped by the Gemini CLI with the--debugflag and error verbosity =full, the deep API response is truncated. It only logs the genericRequest contains an invalid argumentstring and completely omits thefieldViolationsarray:@XinwangTao commented on GitHub (Oct 18, 2026):
Thanks for the detailed repro. This confirms my earlier point that the schema-level fix (non-string const values) is the root cause, and the Gemini 400 is just the user-facing symptom. Agree that trimming the catalog surface for providers with tight schema limits is a reasonable mitigation — it also helps VS Code which rejected
mcp_rea_build_call_pathfor the same class of schema issue. Will retest this exact Gemini flow once a release containing the fix is out.@XinwangTao commented on GitHub (Oct 18, 2026):
Thanks for the hands-on verification — that's really valuable. The fact that the 400 still reproduces on main (with
a2e3016included) means the boolean const schema was not the only trigger; the catalog size/complexity (207 tools injected at once) now looks like the more likely cause. I agree catalog grouping / lazy-loading is the right next step.About step 1: if Fiddler is giving you trouble, mitmproxy is a lighter alternative (pip install mitmproxy, run mitmproxy --listen-port 8080, set HTTPS_PROXY=http://127.0.0.1:8080 before launching gemini, and install the mitmproxy CA cert). Or, even simpler, patch the MCP client in Node to log the full tools/list response before it is sent, so you don't need a system proxy at all.
Once the grouped/on-demand catalog is drafted, your repro will be very useful to confirm the fix actually unblocks Gemini users. Happy to help review the implementation when it lands.
@ElektroStudios commented on GitHub (Oct 18, 2026):
I saw your suggestions about
mitmproxyand patching the Node client. To be completely honest, since I'm really not a Node guy, setting up more proxies or trying to inject JS code into the client was driving me a bit crazy. So I asked Gemini to help me find a dummy-proof way to get the exact payload for you.The AI pointed me to what it seems a cleaner route: use the official MCP Inspector.
I just ran
npx @modelcontextprotocol/inspector rea --mcpto hook directly into my local patched build. The web UI automatically requested thetools/list, and I simply clicked the 'Export' button on the messages panel to download the whole thing.I've attached that exported zipped JSON file here:
The JSON file occupies 20 MB after extraction.
Hopefully, this raw dump is exactly what you need to see which specific schema is still choking the Google API.
@diegoBSousa commented on GitHub (Oct 18, 2026):
I managed to get REA working with Gemini CLI doing two steps:
First I have created a small wrapper to clear the JSON schema in real time:
Then I have configured gemini-cli setting to load my sanitizer:
~/.gemini/settings.json~/.gemini/rea-mcp-sanitize.js
It worked like a charm:
@Nitin13-git commented on GitHub (Oct 18, 2026):
Thanks @diegoBSousa, this is useful: it narrows the Gemini 400 to the schema keywords (not the catalog size alone), and it shows
rea-agents@6.7.0still needs the wrapper.Your sanitizer removes
$schema,additionalPropertiesanddefault, rewritesconstto a one-value stringenum, and collapsesanyOf/oneOfto its first non-null branch. I did not run Gemini, so I cannot say which of those Gemini rejects (you removed them together), but here is what REA advertises today. I startedrea mcpfrom currentmain(b0b485abf) over stdio and scanned thetools/listinput schemas (207 tools):fullprofilecompactprofile (REA_MCP_INPUT_SCHEMA_PROFILE=compact)$schemaadditionalPropertiesdefaultconstanyOfoneOfSeparately, the deepest
fullinput schema is 17 levels (compare_web_captures) andcompactis 5; Google documents no numeric nesting limit for function declarations (only that deep schemas may be rejected), so I am not claiming depth is the cause.So the
compactprofile alone would still send$schema,additionalProperties,constandanyOfto Gemini. If someone can bisect with your wrapper (restore one removed keyword at a time and see which one brings the 400 back), that would identify the exact keyword; a Gemini-specific advertised-schema profile that omits or rewrites just that construct could then be added and verified against a real Gemini run. Nothing here is verified against Gemini yet.@ashukumar-tech commented on GitHub (Oct 18, 2026):
I opened a documentation-only diagnostic proposal in #5067 for this Gemini CLI
400 INVALID_ARGUMENTreport. It separates MCP registration health (rea doctor --client gemini --json) from model-side schema acceptance, suggests an enabled/disabled REA A/B check, and documents the existingREA_MCP_INPUT_SCHEMA_PROFILE=compactsetting without claiming it reduces tool count or fixes every provider limit. This does not claim a runtime fix or a locally reproduced 400; the rejected model request/schema is still needed to establish the root cause. The PR is a draft for review.@carcraze commented on GitHub (Oct 19, 2026):
Root cause isolated for the remaining Gemini 400 on
rea-agents@6.7.0— it is not booleans and not catalog size: it is a single advertised empty-stringconst.A catalog-wide scan (non-string and empty-string
const/enum, full + compact, 207 tools) finds exactly one affected tool:trace_application_feature, atproperties.seed.anyOf[1/2/3].properties.valuewhereconst: ""is advertised. Clients render that asenum: [""], and Google rejects the whole request withenum[0]: cannot be empty— matching the failingseed -> any_of[1/2/3] -> value -> enum[0]paths exactly. Non-string const/enum: zero in both profiles (the #4025 fix holds).Filed as #5201 with the exact evidence and a proposed fix (extend the literal presentation to empty-string literals). Inference, not yet a Gemini-verified A/B: removing only the empty-string
constvalues from the advertised schema should clear the 400.@XinwangTao commented on GitHub (Oct 19, 2026):
Nice isolation, @carcraze — the empty-string const in trace_application_feature explains why the 400 survived the
a2e3016boolean fix: that fix only handled non-string const values, whileconst: ""is technically a string but still renders asenum: [""], which Gemini rejects. The #5201 fix direction (extend literal rendering to cover empty-string literals) sounds right. One suggestion: after the fix, also run the same empty-string scan against the compact profile (REA_MCP_INPUT_SCHEMA_PROFILE=compact), since that profile rewrites some schemas and could theoretically introduce or miss the same pattern. That would make the release verification cheap and deterministic.@aum47 commented on GitHub (Oct 21, 2026):
im having the same issue
@XinwangTao commented on GitHub (Oct 21, 2026):
@aum47 If you are on rea-agents@6.7.0, the fastest way to confirm you are hitting the same trigger is to dump tools/list (MCP Inspector's Export button, as ElektroStudios did above) and check trace_application_feature's seed.value for const: "" — carcraze's #5201 scan shows that empty-string literal renders as enum: [""] and is what Gemini rejects with the 400. The earlier boolean-const fix (
a2e3016) is already in 6.7.0, so a persistent 400 on 6.7.0 points at the empty-string const. Until the #5201 fix ships, diegoBSousa's sanitizer wrapper in this thread is a working workaround. Also worth verifying against the compact profile (REA_MCP_INPUT_SCHEMA_PROFILE=compact) so the release check is deterministic.@XinwangTao commented on GitHub (Oct 21, 2026):
Strong isolation @carcraze — the empty-string const being the sole remaining trigger explains why both the boolean fix (
a2e3016) and the catalog-size mitigation were necessary but individually insufficient. Since we now have a deterministic scan (non-string + empty-string const/enum over full and compact profiles), I'd suggest making it a release gate: a CI check that fails when any advertised schema contains const or enum values that are empty or non-string, run against both profiles. That turns this class of "Gemini 400 after release" bug into a build-time error, and it would have caught all three rounds (booleans, empty strings, future literal edge cases) before they shipped.@Nitin13-git commented on GitHub (Oct 21, 2026):
Correction to my earlier comment: I listed many keywords (
additionalProperties,$schema,const,anyOfand others) as suspects. That was too broad. @carcraze isolated the actual remaining trigger in #5201: one tool,trace_application_feature, advertised an empty-stringconst(seed.value), which clients render asenum: [""], and Gemini rejects withenum[0]: cannot be empty. Thecompactprofile did not help because that value was advertised there too, and @diegoBSousa's wrapper worked because it rewrote thatconst.I re-checked current
main(3dbe314ad) with a stdiotools/listscan of all 213 tools (full profile): no tool advertises an empty-stringconstorenummember in its input schema, andtrace_application_feature'sseedis a plain typed field there. Only its output schema still containsconst: ""(3 places); I do not know of a client that sends output schemas to Gemini as function parameters. So the trigger reported in #5201 looks fixed onmain, but it is not in a release: npmlatestis still 6.7.0, which per #5201's scan still has it. I have not run Gemini CLI, so this is not confirmed against Gemini.@ElektroStudios @aum47: once a release newer than 6.7.0 is published (or from a fresh build of
main), could you retest and say whether the 400 is gone? If it persists, the exactfunction_declarations[n]...path from the error would show whether something else is left.@XinwangTao commented on GitHub (Oct 22, 2026):
Agreed — the corrected scope is much tighter and matches the evidence: additionalProperties/$schema/anyOf were red herrings, and the empty-string const in trace_application_feature's seed.value (rendered as enum: [""]) is the actual trigger that survived both the
a2e3016boolean fix and the catalog-size mitigation. One follow-up worth adding to the release gate: since the remaining const: "" occurrences are in the output schema (3 places) rather than the input schema, the scan should cover both input and output schemas across full and compact profiles. Clients don't currently send output schemas to Gemini as parameters, but keeping the gate symmetric avoids a future regression if that ever changes — and it makes the pre-release check deterministic on both sides.@ElektroStudios commented on GitHub (Oct 26, 2026):
I've tested v6.8.0, it finally works as expected with no 400 error code. I think this issue could be closed unless someone experiences the same issue.
@XinwangTao commented on GitHub (Oct 26, 2026):
Confirmed — the v6.8.0 retest matches the expected outcome: the #5201 empty-string const fix (trace_application_feature seed.value) is what actually cleared the 400, after the earlier boolean-const fix (
a2e3016) and the catalog-size mitigation each proved necessary but insufficient on their own. Thanks @carcraze for isolating the single remaining trigger and @ElektroStudios for verifying on 6.8.0 — this closes the loop on the whole boolean → empty-string const chain, and the release-gate scan will keep this class of bug from shipping again.