-
Notifications
You must be signed in to change notification settings - Fork 13k
Gemini CLI is fond of using unsafe object cloning #22863
Copy link
Copy link
Labels
area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualityworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreamsLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.⛔ Do not contribute. Internal roadmap item.
Metadata
Metadata
Assignees
Labels
area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualityworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreamsLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.⛔ Do not contribute. Internal roadmap item.
Type
Fields
Give feedbackNo fields configured for Bug.
Projects
Status
Closed
I frequently see Gemini generate code that contains unsafe clones of objects where it only partially implements the target type: https://github.com/google-gemini/gemini-cli/pull/22718/changes#diff-f55318278466b9e64c975f9b3d4946a89d4bc5093f4eef67bcf4ae4d487cc7dfR67
The risk of this coding pattern is that it bypasses the compiler checks for the type and creates a variable of type Config that isn't actually a full config implementation. This is really a sign of an architectural problem in the codebase which we'd like to see the agent either avoid introducing.. or better yet.. incrementally improve.