google-gemini/gemini-cli

fix(cli): reset slash-command conflict dedupe when conflicts reappear

Open

#24333 opened on Mar 31, 2026

View on GitHub
 (3 comments) (0 reactions) (1 assignee)TypeScript (103,992 stars) (13,657 forks)batch import
area/coreeffort/smallhelp wantedkind/bugpriority/p2status/bot-triagedstatus/need-informationtype/bug

Description

Summary

SlashCommandConflictHandler permanently records every conflict key it has ever notified in notifiedConflicts, but it never expires or resets those entries when a conflict disappears and later reappears.

Evidence

In packages/cli/src/services/SlashCommandConflictHandler.ts, notifiedConflicts is a process-lifetime Set<string>. handleConflicts(...) skips any conflict key that has ever been seen before, even if that conflict was resolved earlier in the session.

Impact

If an extension, workspace command, or MCP prompt conflict is resolved and then reintroduced later, the user may never receive a second notification. The set also grows monotonically over the life of the process.

Expected behavior

Users should be notified again when a previously-resolved conflict reappears, and the dedupe state should track currently-active conflicts rather than every historical conflict forever.

Suggested fix

Track active conflict keys per flush or per current conflict state instead of using an unbounded permanent set, and add a regression test for reintroduced conflicts.

Contributor guide