Gemini CLI PR fixes duplicate agent loading when workspace is the home directory

urielefrenvirtusa · ghdev · 2026-10-21

This PR fixes false-positive "Duplicate agent name detected" warnings in Gemini CLI when the workspace root is the user's home directory: the project-level and user-level agent dirs then resolve to the same physical folder (/.gemini/agents), so every agent file was parsed twice. The fix wraps project-level agent loading in an isWorkspaceHomeDir() check, following the established pattern in FileCommandLoader, with reproduction steps and unit tests included.

Original post →

More from coding & agent

coding & agent channel →