Skip to content

feat: add /gemini-plugin:gemini-doctor diagnostic command (v0.5.0)#18

Merged
azmym merged 1 commit into
mainfrom
feat/gemini-doctor
May 29, 2026
Merged

feat: add /gemini-plugin:gemini-doctor diagnostic command (v0.5.0)#18
azmym merged 1 commit into
mainfrom
feat/gemini-doctor

Conversation

@azmym

@azmym azmym commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a /gemini-plugin:gemini-doctor slash 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_grounded and got real citations, while the in-memory researcher (loaded from the old definition) saw only Read.

What the doctor checks

  1. API key configured (without printing the key).
  2. MCP server reachable from the main agent: resolves the grounded-search tool under the plugin namespace (mcp__plugin_gemini-plugin_gemini__*) or the manual-install namespace (mcp__gemini__*), then calls it for real.
  3. Subagent grounding path: spawns gemini-researcher and confirms it actually sees a Gemini tool and grounds (the check that catches the stale-session bug).
  4. On-disk version: what the next fresh session will load.

When checks 1 and 2 pass but check 3 fails, the diagnosis is STALE SESSION: restart Claude Code.

Changes

  • New: commands/gemini-doctor.md
  • Version 0.4.1 to 0.5.0 (minor: new functionality); CHANGELOG Added entry
  • README slash-commands table, docs/reference/commands.md, docs/index.md updated to 6 commands
  • tests/commands.bats extended (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).

@azmym azmym added the Claude_Code Changes made by Claude Code label May 29, 2026
@azmym azmym self-assigned this May 29, 2026
@azmym azmym merged commit ec0971b into main May 29, 2026
2 checks passed
@azmym azmym deleted the feat/gemini-doctor branch May 29, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Claude_Code Changes made by Claude Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant