eyaltoledano/claude-task-master · warning
{"warning":"${message}"}
Error message
{"warning":"${message}"} What it means
The autopilot shared output helper's warning() method, when JSON output mode is enabled (useJson), emits warnings as machine-readable JSON: {"warning":"<message>"} printed via console.warn. This is the structured-mode counterpart to the human-readable ⚠️ output (error 703), not an error itself.
Source
Thrown at apps/cli/src/commands/autopilot/shared.ts:115
},
null,
2
)
);
} else {
console.log(chalk.green(`✓ ${message}`));
if (data) {
this.output(data);
}
}
}
/**
* Output warning message
*/
warning(message: string): void {
if (this.useJson) {
console.warn(
JSON.stringify(
{
warning: message
},
null,
2
)
);
} else {
console.warn(chalk.yellow(`⚠️ ${message}`));
}
}
/**
* Output info message
*/
info(message: string): void {
if (this.useJson) {View on GitHub (pinned to c0c98d367c)
Solutions
- Parse stderr lines as JSON objects with a 'warning' key to surface warnings programmatically.
- If human-readable output is desired, drop the --json flag.
- Address the underlying warning message content carried in the JSON payload.
Defensive patterns
Strategy: type-guard
Type guard
function isCliWarning(obj: unknown): obj is { warning: string } {
return typeof obj === 'object' && obj !== null && 'warning' in obj && typeof (obj as any).warning === 'string';
} Try / catch
// warnings go to stderr as JSON lines; capture and filter
proc.stderr.on('data', (chunk) => {
for (const line of chunk.toString().split('\n').filter(Boolean)) {
try {
const parsed = JSON.parse(line);
if (isCliWarning(parsed)) handleWarning(parsed.warning);
} catch { /* non-JSON stderr line */ }
}
}); Prevention
- Parse autopilot stderr line-by-line as JSON when using --json.
- Route stderr and stdout to different streams in CI to keep JSON clean.
- Never assume warnings mean failure — check the process exit code.
When it happens
Trigger: Running any autopilot command with --json (useJson=true) while the command's execute() path calls output.warning(message) for any recoverable condition.
Common situations: CI pipelines parsing autopilot output as JSON; scripts piping stderr into a log aggregator; users surprised that warnings appear on stderr rather than stdout.
Related errors
- ⚠️ ${message}
- Warning: Could not fetch tasks from ${failedTags.length} tag
- Warning: ${invalidDependencies.length} invalid dependency re
- Task ${taskId} depends on non-existent task ${depId}
- ...and ${invalidDependencies.length - 5} more
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/338dbe044866b7da.
Report an issue: GitHub.