@@ -834,12 +834,37 @@ impl CodexMessageProcessor {
834834 request_id : RequestId ,
835835 params : GetConversationSummaryParams ,
836836 ) {
837- let GetConversationSummaryParams { rollout_path } = params;
838- let path = if rollout_path. is_relative ( ) {
839- self . config . codex_home . join ( & rollout_path)
840- } else {
841- rollout_path. clone ( )
837+ let path = match params {
838+ GetConversationSummaryParams :: RolloutPath { rollout_path } => {
839+ if rollout_path. is_relative ( ) {
840+ self . config . codex_home . join ( & rollout_path)
841+ } else {
842+ rollout_path
843+ }
844+ }
845+ GetConversationSummaryParams :: ConversationId { conversation_id } => {
846+ match codex_core:: find_conversation_path_by_id_str (
847+ & self . config . codex_home ,
848+ & conversation_id. to_string ( ) ,
849+ )
850+ . await
851+ {
852+ Ok ( Some ( p) ) => p,
853+ _ => {
854+ let error = JSONRPCErrorError {
855+ code : INVALID_REQUEST_ERROR_CODE ,
856+ message : format ! (
857+ "no rollout found for conversation id {conversation_id}"
858+ ) ,
859+ data : None ,
860+ } ;
861+ self . outgoing . send_error ( request_id, error) . await ;
862+ return ;
863+ }
864+ }
865+ }
842866 } ;
867+
843868 let fallback_provider = self . config . model_provider_id . as_str ( ) ;
844869
845870 match read_summary_from_rollout ( & path, fallback_provider) . await {
@@ -990,6 +1015,43 @@ impl CodexMessageProcessor {
9901015 request_id : RequestId ,
9911016 params : ResumeConversationParams ,
9921017 ) {
1018+ let path = match params {
1019+ ResumeConversationParams {
1020+ path : Some ( path) , ..
1021+ } => path,
1022+ ResumeConversationParams {
1023+ conversation_id : Some ( conversation_id) ,
1024+ ..
1025+ } => {
1026+ match codex_core:: find_conversation_path_by_id_str (
1027+ & self . config . codex_home ,
1028+ & conversation_id. to_string ( ) ,
1029+ )
1030+ . await
1031+ {
1032+ Ok ( Some ( p) ) => p,
1033+ _ => {
1034+ let error = JSONRPCErrorError {
1035+ code : INVALID_REQUEST_ERROR_CODE ,
1036+ message : "unable to locate rollout path" . to_string ( ) ,
1037+ data : None ,
1038+ } ;
1039+ self . outgoing . send_error ( request_id, error) . await ;
1040+ return ;
1041+ }
1042+ }
1043+ }
1044+ _ => {
1045+ let error = JSONRPCErrorError {
1046+ code : INVALID_REQUEST_ERROR_CODE ,
1047+ message : "either path or conversation id must be provided" . to_string ( ) ,
1048+ data : None ,
1049+ } ;
1050+ self . outgoing . send_error ( request_id, error) . await ;
1051+ return ;
1052+ }
1053+ } ;
1054+
9931055 // Derive a Config using the same logic as new conversation, honoring overrides if provided.
9941056 let config = match params. overrides {
9951057 Some ( overrides) => {
@@ -1012,11 +1074,7 @@ impl CodexMessageProcessor {
10121074
10131075 match self
10141076 . conversation_manager
1015- . resume_conversation_from_rollout (
1016- config,
1017- params. path . clone ( ) ,
1018- self . auth_manager . clone ( ) ,
1019- )
1077+ . resume_conversation_from_rollout ( config, path. clone ( ) , self . auth_manager . clone ( ) )
10201078 . await
10211079 {
10221080 Ok ( NewConversation {
@@ -1046,6 +1104,7 @@ impl CodexMessageProcessor {
10461104 conversation_id,
10471105 model : session_configured. model . clone ( ) ,
10481106 initial_messages,
1107+ rollout_path : session_configured. rollout_path . clone ( ) ,
10491108 } ;
10501109 self . outgoing . send_response ( request_id, response) . await ;
10511110 }
0 commit comments