google-gemini / google-gemini/gemini-cli

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

Open
#24,333 6 comments 0 reactions 1 assignee Claimed by @harshpujari View on GitHub
area/core effort/small help wanted kind/bug priority/p2 status/bot-triaged type/bug
Dominant language
TypeScript
Stars
107k
Forks
14.6k
Avg merge
2d 3h
Merged PRs (30d)
45

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`. `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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.