eyaltoledano/claude-task-master · error
ANALYZE_REPORT_MISSING
ANALYZE_REPORT_MISSING
Error message
Analysis completed but no report file was created at the expected path.
What it means
After the core analysis reports success, this function verifies the report file actually exists at resolvedOutputPath on disk. If the file was not written (silent write failure, wrong path, permission issue), it returns ANALYZE_REPORT_MISSING instead of returning a report.
Source
Thrown at mcp-server/src/core/direct-functions/analyze-task-complexity.js:151
error: {
code: 'ANALYZE_CORE_ERROR',
message: `Error running core complexity analysis: ${error.message}`
}
};
} finally {
// Always restore normal logging in finally block if we enabled silent mode
if (!wasSilent && isSilentMode()) {
disableSilentMode();
}
}
// --- Result Handling (remains largely the same) ---
// Verify the report file was created (core function writes it)
if (!fs.existsSync(resolvedOutputPath)) {
return {
success: false,
error: {
code: 'ANALYZE_REPORT_MISSING', // Specific code
message:
'Analysis completed but no report file was created at the expected path.'
}
};
}
if (
!coreResult ||
!coreResult.report ||
typeof coreResult.report !== 'object'
) {
log.error(
'Core analysis function returned an invalid or undefined response.'
);
return {
success: false,
error: {
code: 'INVALID_CORE_RESPONSE',View on GitHub (pinned to c0c98d367c)
Solutions
- Confirm the outputPath directory exists and is writable (mkdir -p, chmod)
- Use an absolute outputPath so it matches the core's write location
- Re-run the analysis and check logs for core warnings about writing the report
Example fix
// before
analyze_project_complexity({ tasksJsonPath: p, outputPath: 'report.json' });
// after
const out = path.resolve(p, '..', 'task-complexity-report.json');
fs.mkdirSync(path.dirname(out), { recursive: true });
analyze_project_complexity({ tasksJsonPath: p, outputPath: out }); Defensive patterns
Strategy: validation
Validate before calling
import fs from 'fs';
import path from 'path';
const out = path.resolve(args.outputPath);
fs.mkdirSync(path.dirname(out), { recursive: true });
fs.accessSync(path.dirname(out), fs.constants.W_OK);
const res = await analyzeTaskComplexityDirect({ ...args, outputPath: out });
if (res.success && !fs.existsSync(out)) { /* treat as ANALYZE_REPORT_MISSING */ } Type guard
function reportWritten(outputPath) {
try { return fs.statSync(outputPath).size > 0; } catch { return false; }
} Try / catch
const res = await analyzeTaskComplexityDirect(args);
if (!res.success && res.error?.code === 'ANALYZE_REPORT_MISSING') {
// ensure output dir exists/writable, re-run once
} Prevention
- Pre-create the output directory and check writability
- Always pass absolute output paths
- After any run, confirm the report file exists before reading it
When it happens
Trigger: Core analysis completes without error but the report file is absent at outputPath — e.g. unwritable directory, outputPath pointing to a different location than where the core wrote, or core writing zero results without failing.
Common situations: Output directory deleted or not writable; relative vs absolute path mismatch between outputPath given to the tool and the core's working directory; read-only filesystem in containers.
Related errors
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/7fffd23885c412ed.
Report an issue: GitHub.