jackwener/OpenCLI · error · CommandExecutionError
Suno feed lookup returned malformed clip identity
Error message
Suno feed lookup returned malformed clip identity
What it means
The `suno list` command fetches your Suno feed from the studio API and maps each clip to a table row. A clip entry that is null/falsy or lacks a non-empty string `id` cannot be rendered (no clip key, no song link), so the command throws CommandExecutionError('Suno feed lookup returned malformed clip identity') rather than emitting a broken row. This guards against schema drift in Suno's /api/feed/v2 payload.
Source
Thrown at clis/suno/list.js:67
if (!res.ok) return { ok: false, status: res.status };
const data = await res.json().catch(() => null);
if (!data || !Array.isArray(data.clips)) return { ok: false, error: 'malformed clips payload' };
return { ok: true, clips: data.clips };
})()`));
if (!result?.ok) {
throw new CommandExecutionError(result?.error || `Suno feed lookup failed (HTTP ${result?.status || '?'}).`);
}
if (!Array.isArray(result.clips)) {
throw new CommandExecutionError('Suno feed lookup returned malformed clips payload');
}
if (result.clips.length === 0) {
throw new EmptyResultError('suno list', 'No Suno clips found in your library.');
}
return result.clips.slice(0, limit).map((c, i) => {
if (!c || typeof c.id !== 'string' || !c.id) {
throw new CommandExecutionError('Suno feed lookup returned malformed clip identity');
}
return {
rank: i + 1 + pageOffset * limit,
clip: c.id.slice(0, 8),
title: c.title || '(untitled)',
status: c.status || '?',
created: (c.created_at || '').replace('T', ' ').replace(/\..*$/, '').replace(/Z$/, ''),
link: `${SUNO_URL}/song/${c.id}`,
};
});
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Update the opencli package to the latest version in case Suno changed the /api/feed/v2 schema and the CLI was patched to match.
- Retry `suno list` on a different page (`--page-offset`) or after a few minutes to skip the transient/deleted clip.
- Inspect the raw payload (e.g. fetch the same endpoint in a Chrome tab signed into suno.com) to see which clip entry lacks an `id`.
- As a workaround, reduce `--limit` so the malformed entry falls outside the sliced window, if it appears late in the feed.
Example fix
// before (client code unaffected; guard is in the CLI)
const clip = clips.find(c => c && typeof c.id === 'string' && c.id);
// after (defensive consume of feed data in your own code)
const rows = (result.clips || []).filter(c => c && typeof c.id === 'string' && c.id).map(c => ({ clip: c.id.slice(0,8), title: c.title || '(untitled)' })); Defensive patterns
Strategy: type-guard
Validate before calling
const clips = Array.isArray(result.clips) ? result.clips : [];
const usable = clips.filter(c => c && typeof c.id === 'string' && c.id.length > 0);
if (usable.length === 0) throw new Error('No valid clips in feed'); Type guard
function isValidClip(c) {
return !!c && typeof c === 'object' && typeof c.id === 'string' && c.id.length > 0;
} Try / catch
try {
const rows = await sunoList();
} catch (err) {
if (err.message.includes('malformed clip identity')) {
// degrade gracefully: filter/skip bad entries or retry with a lower limit
} else throw err;
} Prevention
- Keep the CLI updated against Suno feed schema changes.
- Filter feed entries through an id type guard before rendering.
- Handle EmptyResultError separately so partial/malformed payloads are distinguishable from empty libraries.
When it happens
Trigger: Calling `opencli suno list` when the /api/feed/v2 response contains an entry in `clips` that is null/undefined, or whose `id` field is missing, non-string (e.g. number), or an empty string. This can happen on partially-published or deleted clips still present in the feed, or if Suno changes the feed schema (e.g. renames `id`).
Common situations: Suno API schema changes after the CLI was written; a clip that was deleted mid-feed pagination; A/B-tested feed responses returning placeholder objects; using an outdated CLI version against the current suno.com web API.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- archive search returned malformed payload: result row is mis
- clip-id required (UUID or /song/<id> URL)
- Suno feed lookup returned malformed clips payload
- Unsupported --model "${model}"
- Either provide a Simple-mode prompt as the positional argume
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/77cb6f49aa3fb7cd.
Report an issue: GitHub.