nexu-io/open-design · error · Error
Vela video get returned unexpected task_id ${returnedTaskId
Error message
Vela video get returned unexpected task_id ${returnedTaskId ?? 'missing'} (expected ${taskId}) What it means
During the polling loop, 'vela video get <taskId>' returns JSON whose task_id does not match the taskId that was submitted and is being polled. This is a consistency guard: nonEmptyString(task.task_id) must equal the original taskId.
Source
Thrown at apps/daemon/src/media/vela.ts:489
if (!taskId) throw new Error('Vela video gen response is missing task_id');
lastStatus = nonEmptyString(submitted.status) ?? 'queued';
input.onProgress?.(`Vela video task ${taskId} accepted; polling status ${lastStatus}`);
while (Date.now() - startedAt < totalTimeoutMs) {
await wait(Math.min(pollIntervalMs, Math.max(1, totalTimeoutMs - (Date.now() - startedAt))));
if (Date.now() - startedAt >= totalTimeoutMs) break;
const pollStdout = await runCommand(
['video', 'get', taskId, '--output', outputPath, '--json'],
{
...velaWorkspaceCommandOptions(input.workspaceId),
timeoutMs: pollCommandTimeoutMs,
},
);
const task = parseJsonObject(pollStdout, 'video get');
const returnedTaskId = nonEmptyString(task.task_id);
if (returnedTaskId !== taskId) {
throw new Error(
`Vela video get returned unexpected task_id ${returnedTaskId ?? 'missing'} (expected ${taskId})`,
);
}
lastStatus = nonEmptyString(task.status) ?? 'missing';
const elapsedSeconds = Math.round((Date.now() - startedAt) / 1000);
input.onProgress?.(`Vela video status ${lastStatus}; elapsed ${elapsedSeconds}s`);
if (lastStatus === 'succeeded') {
const bytes = await readNonEmptyOutput(outputPath, 'video get');
return {
bytes,
providerNote: `vela/${wireModel} · ${ratio} · ${input.length ?? 5}s · ${DEFAULT_VELA_VIDEO_RESOLUTION} default · ${bytes.length} bytes`,
suggestedExt: '.mp4',
};
}
if (lastStatus === 'failed' || lastStatus === 'cancelled' || lastStatus === 'canceled') {
throw new Error(`Vela video task ended with status ${lastStatus}: ${videoTaskError(task)}`);
}View on GitHub (pinned to 5be4028344)
Solutions
- Update the Vela CLI to a version compatible with the daemon
- Check for concurrent video generation requests that might interfere with task isolation
- Inspect the poll response JSON to see what task_id value was returned
- Clear Vela CLI state/cache and retry
Defensive patterns
Strategy: try-catch
Try / catch
try {
const result = await renderVelaVideo(input);
} catch (err) {
if (err.message.includes('unexpected task_id')) {
// Task isolation violation — abort and clean up
logger.error('Vela video task_id mismatch during polling', err);
throw err;
}
throw err;
} Prevention
- Avoid running concurrent video generation tasks that might cause CLI state confusion
- Keep the Vela CLI version updated to match the daemon contract
- Clear Vela CLI cache/state if task_id mismatches become recurrent
When it happens
Trigger: The Vela CLI's video get command returns data for a different task; the task_id field in the poll response is missing (nonEmptyString returns null, which !== taskId); a CLI bug or proxy rewriting response payloads.
Common situations: Vela CLI version mismatch causing task_id format changes (e.g. prefix added/removed); concurrent video tasks causing response confusion in the CLI; corrupted CLI state file.
Related errors
- Vela video task timed out after ${totalTimeoutMs}ms; last st
- volcengine poll ${pollResp.status}: ${truncate(pollText, 240
- Vela video only supports aspect ratios 16:9, 9:16, or 1:1; r
- Vela video only supports durations of 5 or 10 seconds; recei
- Vela video gen response is missing task_id
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/8c815678722292b5.
Report an issue: GitHub.