{"record":{"id":"b56b6b8bd306edba","repo":"ruvnet/ruflo","slug":"cannot-update-task-with-status-task-status","errorCode":null,"errorMessage":"Cannot update task with status: ${task.status}","messagePattern":"Cannot update task with status: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/mcp/tools/task-tools.ts","lineNumber":689,"sourceCode":"        updated: result.updated,\n        updatedAt,\n        changes: result.changes || {},\n      };\n    } catch (error) {\n      console.error('Failed to update task via orchestrator:', error);\n      // Fall through to simple implementation\n    }\n  }\n\n  // Simple implementation\n  const task = taskStore.get(input.taskId);\n  if (!task) {\n    throw new Error(`Task not found: ${input.taskId}`);\n  }\n\n  // Check if task can be updated\n  if (task.status === 'completed' || task.status === 'cancelled') {\n    throw new Error(`Cannot update task with status: ${task.status}`);\n  }\n\n  // Apply updates\n  if (input.priority !== undefined && input.priority !== task.priority) {\n    changes.priority = { from: task.priority, to: input.priority };\n    task.priority = input.priority;\n  }\n\n  if (input.description !== undefined && input.description !== task.description) {\n    changes.description = { from: task.description, to: input.description };\n    task.description = input.description;\n  }\n\n  if (input.timeout !== undefined && input.timeout !== task.timeout) {\n    changes.timeout = { from: task.timeout, to: input.timeout };\n    task.timeout = input.timeout;\n  }\n","sourceCodeStart":671,"sourceCodeEnd":707,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/mcp/tools/task-tools.ts#L671-L707","documentation":"handleUpdateTask found the task but its status is 'completed' or 'cancelled'. Terminal-state tasks are immutable, so applying further field updates is refused rather than silently resurrecting the task.","triggerScenarios":"Thrown at v3/mcp/tools/task-tools.ts:689 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only update tasks whose status permits modification.","Check the task lifecycle and perform updates before completion or cancellation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}