There's a naming collision: both ChatContextKeys.chatSessionType (line 65) and ChatContextKeys.agentSessionType (line 103) use the same context key string 'chatSessionType'. This creates ambiguity and can lead to unexpected behavior. The agentSessionType export should use a different key string, such as 'agentSessionType'.
export const chatSessionType = new RawContextKey<string>('sessionType', '', { type: 'string', description: localize('chatSessionType', "The type of the current chat session.") });
Originally posted by @Copilot in #288181 (comment)