nexu-io/open-design · error · Error
Vela image ${command} returned non-ready asset status ${stat
Error message
Vela image ${command} returned non-ready asset status ${status ?? 'missing'} What it means
Thrown after confirming asset_id when asset.status is not the string 'ready'. Vela's image gen/edit is synchronous; a non-ready status means the asset exists but is not in a deliverable state (e.g. 'failed', 'pending', 'error'). The actual status (or 'missing' if absent) is shown.
Source
Thrown at apps/daemon/src/media/vela.ts:392
? ['--aspect-ratio', profile.aspectRatio, '--resolution', profile.resolution]
: []),
...quality,
'--output',
outputPath,
'--json',
];
const stdout = await runCommand(args, {
...velaWorkspaceCommandOptions(input.workspaceId),
timeoutMs: VELA_IMAGE_TIMEOUT_MS,
});
const asset = parseJsonObject(stdout, `image ${command}`);
const assetId = nonEmptyString(asset.asset_id);
const status = nonEmptyString(asset.status);
const kind = nonEmptyString(asset.kind);
const mime = nonEmptyString(asset.mime_type);
if (!assetId) throw new Error(`Vela image ${command} response is missing asset_id`);
if (status !== 'ready') {
throw new Error(`Vela image ${command} returned non-ready asset status ${status ?? 'missing'}`);
}
if (kind !== 'image') {
throw new Error(`Vela image ${command} returned unexpected kind ${kind ?? 'missing'}`);
}
if (!mime?.startsWith('image/')) {
throw new Error(`Vela image ${command} returned invalid mime_type ${mime ?? 'missing'}`);
}
const bytes = await readNonEmptyOutput(outputPath, `image ${command}`);
return {
bytes,
// The tier is part of what the user was charged for, so name it when it
// was chosen and say so plainly when the server's default decided.
providerNote: `vela/${wireModel} · ${
profile ? `${profile.aspectRatio} ${profile.resolution}` : 'model default profile'
} · ${requestedQuality ?? 'model default quality'} · ${bytes.length} bytes`,
suggestedExt: extensionForImageMime(mime),
};
} finally {View on GitHub (pinned to 5be4028344)
Solutions
- Read the embedded status value — 'failed'/'error' usually means retry with a different prompt
- For 'pending'/'moderated', retry after a short delay
- Run the Vela command directly to see the full asset envelope and any stderr detail
- If the status is unexpected for the CLI version, check for a schema change
Defensive patterns
Strategy: try-catch
Validate before calling
function assetIsReady(asset: Record<string, unknown>): boolean {
return asset.status === 'ready';
} Type guard
function isReadyAsset(asset: unknown): boolean {
return typeof asset === 'object' && asset !== null
&& (asset as { status?: unknown }).status === 'ready';
} Try / catch
try {
if (!isReadyAsset(asset)) throw new Error(`non-ready status: ${asset.status ?? 'missing'}`);
} catch (err) {
if (/non-ready/.test(String((err as Error).message))) {
// retry for pending/moderated, or fail with a user-facing message for failed/error
} else throw err;
} Prevention
- Inspect the status value to decide retry vs fail — pending may resolve, failed usually will not
- Capture the full asset envelope so moderation or error reasons are diagnosable
- Add retries only for transient statuses, not for 'failed'/'error'
When it happens
Trigger: Vela image gen/edit JSON has a status field that is anything other than 'ready' — for example 'failed', 'error', 'pending', 'moderated', or an empty/missing status.
Common situations: Upstream generation failed (content policy, model error) but Vela still returned an asset envelope; transient moderation hold; CLI emitted a pre-ready status; Vela bug.
Related errors
- Vela image ${command} response is missing asset_id
- Vela image ${command} returned unexpected kind ${kind ?? 'mi
- Vela image ${command} returned invalid mime_type ${mime ?? '
- Vela ${command} returned no JSON output
- Vela ${command} returned invalid JSON: ${detail}
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/b11ae0b894b8f645.
Report an issue: GitHub.