gemini-cli PR grounds cli_help agent with runtime reference to stop flag hallucinations

dylanyunlon · ghdev · 2026-09-18

A PR (google-gemini/gemini-cli #29382) fixes hallucinations in the clihelp subagent, which suggested deprecated flags like --yolo, forgot hotkeys, and invented slash commands because it relied solely on possibly-stale static markdown docs.

The fix introduces a structured runtime reference service exporting three authoritative datasets—28 CLI flags, 33 keyboard shortcuts, 41 slash commands—synced with yargs config, keyBindings.ts, and BuiltinCommandLoader. A new getclireference tool (no filesystem access) is registered in both tool sets, and the agent's system prompt now mandates calling it first for any flag/hotkey/command question. Includes 41 new tests and 2 behavioral evals.

Original post →

More from coding & agent

coding & agent channel →