eyaltoledano/claude-task-master · error
MISSING_SOURCE_IDS
MISSING_SOURCE_IDS
Error message
Source IDs are required
What it means
MISSING_SOURCE_IDS is a parameter validation error returned by moveTaskCrossTagDirect when the `sourceIds` argument is absent/falsy. Cross-tag task moves require at least one source task ID to know which task(s) to move. It is a structured (non-throwing) error response with success:false.
Source
Thrown at mcp-server/src/core/direct-functions/move-task-cross-tag.js:39
* @param {boolean} args.ignoreDependencies - Break cross-tag dependencies during move
* @param {string} args.file - Alternative path to the tasks.json file
* @param {string} args.projectRoot - Project root directory
* @param {Object} log - Logger object
* @returns {Promise<{success: boolean, data?: Object, error?: Object}>}
*/
export async function moveTaskCrossTagDirect(args, log, context = {}) {
const { session } = context;
const { projectRoot } = args;
log.info(`moveTaskCrossTagDirect called with args: ${JSON.stringify(args)}`);
// Validate required parameters
if (!args.sourceIds) {
return {
success: false,
error: {
message: 'Source IDs are required',
code: 'MISSING_SOURCE_IDS'
}
};
}
if (!args.sourceTag) {
return {
success: false,
error: {
message: 'Source tag is required for cross-tag moves',
code: 'MISSING_SOURCE_TAG'
}
};
}
if (!args.targetTag) {
return {
success: false,
error: {View on GitHub (pinned to c0c98d367c)
Solutions
- Pass `sourceIds` with the task ID(s) to move, e.g. sourceIds: "5" or "1,2,3".
- If invoking from an LLM, include sourceIds in the tool arguments schema so it is always supplied.
- Check your CLI invocation includes --from=<id> (or the equivalent sourceIds argument).
Example fix
// before
await moveTaskCrossTagDirect({ sourceTag: 'backlog', targetTag: 'in-progress' }, log);
// after
await moveTaskCrossTagDirect({ sourceIds: '5', sourceTag: 'backlog', targetTag: 'in-progress' }, log); Defensive patterns
Strategy: validation
Validate before calling
const sourceIds = args.sourceIds;
if (sourceIds === undefined || sourceIds === null || sourceIds === '') {
throw new Error('sourceIds is required before calling move-task');
} Type guard
function hasSourceIds(args) {
return typeof args?.sourceIds === 'string' ? args.sourceIds.trim().length > 0 : Array.isArray(args?.sourceIds) && args.sourceIds.length > 0;
} Try / catch
const resp = await moveTaskCrossTagDirect(args, log);
if (!resp.success && resp.error.code === 'MISSING_SOURCE_IDS') {
throw new Error('Provide sourceIds, e.g. { sourceIds: "5" }');
} Prevention
- Always pass sourceIds (even a single ID) with every move_task tool call.
- Validate tool arguments in the client before dispatching to the MCP server.
- For LLM callers, mark sourceIds as required in the tool's input schema.
When it happens
Trigger: Calling the move-task MCP tool (which delegates to moveTaskCrossTagDirect) without providing `sourceIds` — e.g. args = { sourceTag: 'backlog', targetTag: 'in-progress' } with no sourceIds — hits the guard at mcp-server/src/core/direct-functions/move-task-cross-tag.js:39.
Common situations: Omitting the --from/IDs flag on the CLI move command, an LLM client invoking the move_task tool without filling in sourceIds, or passing an empty string instead of an ID.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/9e7a6b8dc3e181f2.
Report an issue: GitHub.