gemini-cli - 💡(How to fix) Fix bug(core): regression in tool call accuracy (missing required parameters like file_path)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Root Cause: Needs further investigation. The issue appears to be related to how tool schemas or system prompts are being generated or consumed by the model.

RAW_BUFFERClick to expand / collapse

What happened?

The agent has started producing invalid tool calls with missing required parameters. Examples include:

  • edit {} (missing file_path, instruction, old_string, new_string)
  • grep_search {} (missing pattern)
  • update_topic {} (missing strategic_intent)

These result in validation errors like params must have required property 'file_path' being displayed in the terminal, often halting the agent's progress.

What did you expect to happen?

The agent should correctly populate all required parameters for tool calls according to the JSON schemas defined in packages/core/src/tools/definitions/.

Client information

<details> <summary>Client Information</summary>

Gemini CLI v0.41.0, v0.41.1, v0.41.2 Platform: All.

</details>

Anything else we need to know?

Root Cause: Needs further investigation. The issue appears to be related to how tool schemas or system prompts are being generated or consumed by the model.

Suspected Commits:

  • de8fdcfa1 Fix bulk of remaining issues with generalist profile (#26073): This commit significantly altered model resolution and potentially how profiles interact with tool schemas. It is possible that detailed tool descriptions or required parameters are being inadvertently stripped or overridden when the Generalist profile is active.
  • Note: A previous theory that this was caused by a typo in snippets.ts (commit 0218817fe) has been debunked; that commit actually fixed the typo.

Next Steps: Investigate the tool schema generation pipeline (specifically within packages/core/src/tools/definitions/ and the new AgentSession / profile logic) to ensure full schemas are being accurately transmitted to the Gemini API in v0.41.2.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING