@@ -486,16 +486,14 @@ func handleUpdateTask(
if goalIDArg, exists := arguments["goal_id"]; exists {
if goalIDStr, ok := goalIDArg.(string); ok && goalIDStr != "" {
updatePayload.GoalID = goalIDStr
- if !areaIDProvided && specifiedArea == nil {
- // If goal_id is specified, but area_id is not, we cannot validate the goal against a specific area from config.
- // The API will have to handle this. For stricter local validation, one might require area_id here.
- // For now, we proceed, assuming the API can handle it or the goal is in the task's current (unchanged) area.
- // If area_id WAS provided, specifiedArea would be set.
- // If area_id was NOT provided, we need to check all areas, or rely on API.
- // Let's enforce that if goal_id is given, and area_id is also given, the goal must be in that area.
- // If goal_id is given and area_id is NOT, we can't validate locally.
- // The description for goal_id parameter hints at this.
- }
+ // If goal_id is specified, but area_id is not, we cannot validate the goal against a specific area from config.
+ // The API will have to handle this. For stricter local validation, one might require area_id here.
+ // For now, we proceed, assuming the API can handle it or the goal is in the task's current (unchanged) area.
+ // If area_id WAS provided, specifiedArea would be set.
+ // If area_id was NOT provided, we need to check all areas, or rely on API.
+ // Let's enforce that if goal_id is given, and area_id is also given, the goal must be in that area.
+ // If goal_id is given and area_id is NOT, we can't validate locally.
+ // The description for goal_id parameter hints at this.
if specifiedArea != nil { // Only validate goal if its intended area (new or existing) is known
foundGoal := false
for _, goal := range specifiedArea.Goals {