jackwener/OpenCLI · warning · CommandExecutionError
Could not verify list removal: list ${listId} missing from p
Error message
Could not verify list removal: list ${listId} missing from post-delete payload What it means
Verification parsed the post-delete lists payload but the list with the requested listId was absent from it. The library cannot confirm the member_count drop (its chosen verification signal) without that list's entry, so it throws rather than claiming success.
Source
Thrown at clis/twitter/list-remove-core.js:251
await page.nativeClick(uiResult.rowClickX, uiResult.rowClickY);
await new Promise((r) => setTimeout(r, 800));
await page.nativeClick(uiResult.saveClickX, uiResult.saveClickY);
await new Promise((r) => setTimeout(r, 3500));
const listsAfter = unwrapBrowserResult(await page.evaluate(`async () => {
const r = await fetch(${JSON.stringify(listsUrl)}, { headers: ${headers}, credentials: 'include' });
if (!r.ok) return { __error: 'HTTP ' + r.status };
return await r.json();
}`));
if (listsAfter && listsAfter.__error) {
throw new CommandExecutionError(`Could not verify list removal: ${listsAfter.__error}`);
}
if (!getListsManagementInstructions(listsAfter)) {
throw new CommandExecutionError('Could not verify list removal: unexpected lists payload shape');
}
const parsedAfter = parseListsManagement(listsAfter, new Set());
const afterList = parsedAfter.find((l) => l.id === listId);
if (!afterList) {
throw new CommandExecutionError(`Could not verify list removal: list ${listId} missing from post-delete payload`);
}
const memberCountAfter = Number(afterList.members) || 0;
if (memberCountAfter < memberCountBefore) {
verifiedBy = `member_count ${memberCountBefore} → ${memberCountAfter}`;
} else {
throw new CommandExecutionError(`Failed to remove @${username} from list ${listId}: member_count unchanged (${memberCountBefore} → ${memberCountAfter}).`);
}
}
return [{
listId,
username,
userId: String(userId),
status: uiResult.noop ? 'noop' : 'success',
message: uiResult.noop
? `@${username} was not a member of list ${listId}`
: `Removed @${username} from list ${listId} (verified via ${verifiedBy})`,
}];View on GitHub (pinned to 49907e53dc)
Solutions
- Reduce the account's list count or verify manually — the removal likely succeeded but the list is simply not in the fetched page
- Re-run the command; pagination order can shift after mutations
- Confirm the list still exists via `opencli twitter lists` and that listId matches exactly (numeric string)
- If it recurs, file a bug: verification should paginate or treat a missing list as 'deleted/unknown' instead of erroring
Example fix
// before
const out = await listRemoveUser(page, { listId, username });
// after
try {
const out = await listRemoveUser(page, { listId, username });
} catch (e) {
if (e.message.includes('missing from post-delete payload')) {
const stillThere = (await runTwitterCommand('lists', {})).some(l => String(l.id) === String(listId));
console.log(stillThere ? 'removal unverified; list still exists' : 'list gone; treat removal as done');
} else throw e;
} Defensive patterns
Strategy: fallback
Validate before calling
const lists = await run('twitter', 'lists', { limit: 200 });
const target = lists.find(l => String(l.id) === String(listId));
if (!target) throw new Error(`List ${listId} not visible via lists API — cannot verify removal.`); Type guard
const found = (arr, id) => Array.isArray(arr) && arr.some(l => String(l.id) === String(id));
Try / catch
try {
await listRemoveUser(page, { listId, username });
} catch (e) {
if (String(e.message).includes('missing from post-delete payload')) {
// treat as unverified, not failed
console.warn(`List ${listId} not in verification page; verify membership separately.`);
} else throw e;
} Prevention
- Avoid running this on accounts with more lists than one page returns
- Confirm listId matches exactly (numeric string, no whitespace)
- Re-run once — pagination order can shift right after mutations
- Treat 'unverified' as 'check manually', not 'failed'
When it happens
Trigger: After the Save click, parseListsManagement ran over the fresh payload and .find(l => l.id === listId) returned undefined — e.g. the payload is paginated and the list fell on a later page not fetched, or the list was deleted/renamed between the pre-check and verification.
Common situations: Accounts with many lists where the target list is beyond the first page of the management timeline; the list was deleted concurrently; listId passed as a differently-formatted string (id coercion mismatch between pre- and post-parse).
Related errors
- limit must be a positive integer (1-${max})
- limit must be <= ${max}
- NO_DATA
- ${label} must be a positive integer
- ${label} must be <= ${maxValue}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/9c4bf884a40043dd.
Report an issue: GitHub.