diff --git a/shell/AIShell.Kernel/Utility/ReadLineHelper.cs b/shell/AIShell.Kernel/Utility/ReadLineHelper.cs index cffda3d4..ce5bec94 100644 --- a/shell/AIShell.Kernel/Utility/ReadLineHelper.cs +++ b/shell/AIShell.Kernel/Utility/ReadLineHelper.cs @@ -201,6 +201,12 @@ private CommandCompletion CompleteForAgent(string input, int cursorIndex) foreach (var a in _shell.Agents) { + if (ReferenceEquals(a, _shell.ActiveAgent)) + { + // Skip the current active agent. + continue; + } + string agentName = a.Impl.Name; if (agentName.StartsWith(targetName, StringComparison.OrdinalIgnoreCase)) {