feat: add /gemini-plugin:gemini-doctor diagnostic command (v0.5.0)#18
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
/gemini-plugin:gemini-doctorslash command that diagnoses, with evidence, whether Gemini grounding actually works in the current session, and distinguishes a real outage from a stale session that just needs a restart.Why
The most common "grounding produced nothing" report is a stale session: the MCP server works, but a session started before a plugin update still has the outdated subagent definitions loaded in memory (subagent defs are loaded at session start and not reloaded on update). Until now there was no one-step way to tell that apart from a genuine server/key failure. This was confirmed empirically: a probe of the live session showed the main agent could reach
mcp__plugin_gemini-plugin_gemini__gemini_search_groundedand got real citations, while the in-memory researcher (loaded from the old definition) saw onlyRead.What the doctor checks
mcp__plugin_gemini-plugin_gemini__*) or the manual-install namespace (mcp__gemini__*), then calls it for real.gemini-researcherand confirms it actually sees a Gemini tool and grounds (the check that catches the stale-session bug).When checks 1 and 2 pass but check 3 fails, the diagnosis is STALE SESSION: restart Claude Code.
Changes
commands/gemini-doctor.mddocs/reference/commands.md,docs/index.mdupdated to 6 commandstests/commands.batsextended (now asserts 6 commands and that the doctor checks both the server and the subagent path)Testing
bats tests/ : 81 tests, all green locally (CI runs Ubuntu + macOS).