eyaltoledano/claude-task-master · error

UPDATE_TASK_CORE_ERROR

UPDATE_TASK_CORE_ERROR

Error message

error.message || 'Unknown error updating task'

What it means

Generic catch-all inside updateTaskByIdDirect: any exception thrown by the core updateTaskById call (file parsing, AI API failure, task not found, storage errors) is returned as an MCP error result with code UPDATE_TASK_CORE_ERROR and the underlying error message.

Source

Thrown at mcp-server/src/core/direct-functions/update-task-by-id.js:172

			return {
				success: true,
				data: {
					message: successMessage,
					taskId: taskId,
					tasksPath: tasksPath,
					useResearch: useResearch,
					updated: true,
					updatedTask: coreResult.updatedTask,
					telemetryData: coreResult.telemetryData,
					tagInfo: coreResult.tagInfo
				}
			};
		} catch (error) {
			logWrapper.error(`Error updating task by ID: ${error.message}`);
			return {
				success: false,
				error: {
					code: 'UPDATE_TASK_CORE_ERROR',
					message: error.message || 'Unknown error updating task'
				}
			};
		} finally {
			if (!wasSilent && isSilentMode()) {
				disableSilentMode();
			}
		}
	} catch (error) {
		logWrapper.error(`Setup error in updateTaskByIdDirect: ${error.message}`);
		if (isSilentMode()) disableSilentMode();
		return {
			success: false,
			error: {
				code: 'DIRECT_FUNCTION_SETUP_ERROR',
				message: error.message || 'Unknown setup error'
			}
		};

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Read the returned message for the root cause (e.g. 'Task with id 99 not found' vs API auth error)
  2. Verify the task id exists in tasks.json (task-master list)
  3. Check API key env vars and network access if the message mentions the AI provider
  4. Validate tasks.json parses as JSON (task-master parse or jq)
Defensive patterns

Strategy: try-catch

Validate before calling

import { readFileSync } from 'fs';
function preflight(tasksPath, taskId) {
  const db = JSON.parse(readFileSync(tasksPath, 'utf8'));
  return db.tasks?.some(t => String(t.id) === String(taskId));
}

Try / catch

const result = await updateTaskByIdDirect(args, log);
if (!result.success) {
  if (result.error.code === 'UPDATE_TASK_CORE_ERROR') {
    console.error(`Task update failed: ${result.error.message}`);
    // inspect cause: missing id, bad tasks.json, or AI/API failure
  }
}

Prevention

When it happens

Trigger: Core updateTaskById throws after validation passes: tasks.json is malformed JSON, the id does not resolve to a task, the AI provider API call fails or is unauthenticated, or filesystem write errors occur.

Common situations: Missing/invalid API keys (ANTHROPIC_API_KEY etc.); corrupted tasks.json; updating a nonexistent task id; network outage during AI call; read-only filesystem.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/769b00ab08819581. Report an issue: GitHub.