tweak: ensure synthetic user message following subtasks is only added when user manually invoked subtask

This commit is contained in:
Aiden Cline
2026-01-20 22:51:54 -06:00
parent b93f33eaa4
commit 9dc95c4c69

View File

@@ -454,6 +454,7 @@ export namespace SessionPrompt {
} satisfies MessageV2.ToolPart) } satisfies MessageV2.ToolPart)
} }
if (task.command) {
// Add synthetic user message to prevent certain reasoning models from erroring // Add synthetic user message to prevent certain reasoning models from erroring
// If we create assistant messages w/ out user ones following mid loop thinking signatures // If we create assistant messages w/ out user ones following mid loop thinking signatures
// will be missing and it can cause errors for models like gemini for example // will be missing and it can cause errors for models like gemini for example
@@ -476,6 +477,7 @@ export namespace SessionPrompt {
text: "Summarize the task tool output above and continue with your task.", text: "Summarize the task tool output above and continue with your task.",
synthetic: true, synthetic: true,
} satisfies MessageV2.TextPart) } satisfies MessageV2.TextPart)
}
continue continue
} }