@@ -42,6 +42,7 @@ import {
4242 resolveFastServiceTier ,
4343} from "./FastModeConfig" ;
4444import packageJson from "../package.json" ;
45+ import { isJetBrains2026_1Client } from "./JBUtils" ;
4546
4647export interface SessionState {
4748 sessionId : string ,
@@ -90,6 +91,7 @@ export class CodexAcpServer implements acp.Agent {
9091 private readonly defaultAuthRequest : CodexAuthRequest | null ;
9192 private readonly getExitCode : ( ) => number | null ;
9293 private readonly availableCommands : CodexCommands ;
94+ private clientInfo : acp . Implementation | null ;
9395
9496 private readonly sessions : Map < string , SessionState > ;
9597 private readonly pendingMcpStartupSessions : Map < string , PendingMcpStartupSession > ;
@@ -116,6 +118,7 @@ export class CodexAcpServer implements acp.Agent {
116118 this . codexAcpClient = codexAcpClient ;
117119 this . defaultAuthRequest = defaultAuthRequest ?? null ;
118120 this . getExitCode = getExitCode ?? ( ( ) => null ) ;
121+ this . clientInfo = null ;
119122 this . availableCommands = new CodexCommands (
120123 connection ,
121124 codexAcpClient ,
@@ -127,6 +130,7 @@ export class CodexAcpServer implements acp.Agent {
127130 _params : acp . InitializeRequest ,
128131 ) : Promise < acp . InitializeResponse > {
129132 logger . log ( "Initialize request received" ) ;
133+ this . clientInfo = _params . clientInfo ?? null ;
130134 await this . runWithProcessCheck ( ( ) => this . codexAcpClient . initialize ( _params ) ) ;
131135 return {
132136 protocolVersion : acp . PROTOCOL_VERSION ,
@@ -382,7 +386,7 @@ export class CodexAcpServer implements acp.Agent {
382386 return {
383387 models : modelState ,
384388 modes : modeState ,
385- configOptions : this . createSessionConfigOptions ( this . getSessionState ( sessionId ) ) ,
389+ ... this . createSessionConfigOptionsResponse ( this . getSessionState ( sessionId ) ) ,
386390 } ;
387391 }
388392
@@ -398,7 +402,7 @@ export class CodexAcpServer implements acp.Agent {
398402 return {
399403 models : modelState ,
400404 modes : modeState ,
401- configOptions : this . createSessionConfigOptions ( this . getSessionState ( sessionId ) ) ,
405+ ... this . createSessionConfigOptionsResponse ( this . getSessionState ( sessionId ) ) ,
402406 } ;
403407 }
404408
@@ -458,7 +462,7 @@ export class CodexAcpServer implements acp.Agent {
458462 sessionId : sessionId ,
459463 models : modelState ,
460464 modes : modeState ,
461- configOptions : this . createSessionConfigOptions ( this . getSessionState ( sessionId ) ) ,
465+ ... this . createSessionConfigOptionsResponse ( this . getSessionState ( sessionId ) ) ,
462466 } ;
463467 }
464468
@@ -567,6 +571,22 @@ export class CodexAcpServer implements acp.Agent {
567571 ] ;
568572 }
569573
574+ private createSessionConfigOptionsResponse ( sessionState : SessionState ) : {
575+ configOptions ?: Array < acp . SessionConfigOption > ;
576+ } {
577+ if ( ! this . isSessionConfigEnabled ( ) ) {
578+ return { } ;
579+ }
580+ return {
581+ configOptions : this . createSessionConfigOptions ( sessionState ) ,
582+ } ;
583+ }
584+
585+ private isSessionConfigEnabled ( ) : boolean {
586+ // Temporarily disabled for JB IDEs 2026.1 due to issues in session_config (LLM-28118)
587+ return ! isJetBrains2026_1Client ( this . clientInfo ) ;
588+ }
589+
570590 private publishAvailableCommandsAsync ( sessionId : string ) {
571591 void this . availableCommands . publish ( sessionId ) ;
572592 }
0 commit comments