claude: Fork session on resume to enable retry (#899)

This commit is contained in:
Solomon
2025-10-01 15:13:48 +01:00
committed by GitHub
parent ff2edd4c11
commit 7217ab535b

View File

@@ -166,8 +166,11 @@ impl StandardCodingAgentExecutor for ClaudeCode {
let (shell_cmd, shell_arg) = get_shell_command(); let (shell_cmd, shell_arg) = get_shell_command();
let command_builder = self.build_command_builder().await; let command_builder = self.build_command_builder().await;
// Build follow-up command with --resume {session_id} // Build follow-up command with --resume {session_id}
let mut base_command = let mut base_command = command_builder.build_follow_up(&[
command_builder.build_follow_up(&["--resume".to_string(), session_id.to_string()]); "--fork-session".to_string(),
"--resume".to_string(),
session_id.to_string(),
]);
if self.plan.unwrap_or(false) { if self.plan.unwrap_or(false) {
base_command = create_watchkill_script(&base_command); base_command = create_watchkill_script(&base_command);