@@ -558,6 +558,8 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
558558 const sdkModelId = toSdkModelId ( params . value ) ;
559559 await this . session . query . setModel ( sdkModelId ) ;
560560 this . session . modelId = params . value ;
561+ } else if ( params . configId === "effort" ) {
562+ this . session . effort = params . value as "low" | "medium" | "high" | "max" ;
561563 }
562564
563565 this . session . configOptions = this . session . configOptions . map ( ( o ) =>
@@ -623,6 +625,12 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
623625
624626 const meta = params . _meta as NewSessionMeta | undefined ;
625627 const taskId = meta ?. persistence ?. taskId ;
628+ const effort = meta ?. claudeCode ?. options ?. effort as
629+ | "low"
630+ | "medium"
631+ | "high"
632+ | "max"
633+ | undefined ;
626634
627635 // We want to create a new session id unless it is resume,
628636 // but not resume + forkSession.
@@ -673,6 +681,7 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
673681 onModeChange : this . createOnModeChange ( ) ,
674682 onProcessSpawned : this . options ?. onProcessSpawned ,
675683 onProcessExited : this . options ?. onProcessExited ,
684+ effort,
676685 } ) ;
677686
678687 // Use the same abort controller that buildSessionOptions gave to the query
@@ -693,6 +702,7 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
693702 cachedReadTokens : 0 ,
694703 cachedWriteTokens : 0 ,
695704 } ,
705+ effort,
696706 configOptions : [ ] ,
697707 promptRunning : false ,
698708 pendingMessages : new Map ( ) ,
@@ -790,7 +800,11 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
790800 ) ,
791801 } ;
792802
793- const configOptions = this . buildConfigOptions ( permissionMode , modelOptions ) ;
803+ const configOptions = this . buildConfigOptions (
804+ permissionMode ,
805+ modelOptions ,
806+ effort ?? "high" ,
807+ ) ;
794808 session . configOptions = configOptions ;
795809
796810 if ( ! creationOpts . skipBackgroundFetches ) {
@@ -844,6 +858,7 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
844858 currentModelId : string ;
845859 options : SessionConfigSelectOption [ ] ;
846860 } ,
861+ currentEffort : "low" | "medium" | "high" | "max" = "high" ,
847862 ) : SessionConfigOption [ ] {
848863 const modeOptions = getAvailableModes ( ) . map ( ( mode ) => ( {
849864 value : mode . id ,
@@ -871,6 +886,20 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
871886 category : "model" as SessionConfigOptionCategory ,
872887 description : "Choose which model Claude should use" ,
873888 } ,
889+ {
890+ id : "effort" ,
891+ name : "Effort" ,
892+ type : "select" ,
893+ currentValue : currentEffort ,
894+ options : [
895+ { value : "low" , name : "Low" } ,
896+ { value : "medium" , name : "Medium" } ,
897+ { value : "high" , name : "High" } ,
898+ { value : "max" , name : "Max" } ,
899+ ] ,
900+ category : "thought_level" as SessionConfigOptionCategory ,
901+ description : "Controls how much effort Claude puts into its response" ,
902+ } ,
874903 ] ;
875904 }
876905
0 commit comments