jackwener/OpenCLI · error · CommandExecutionError
Delete menu item was clicked, but the conversation is still
Error message
Delete menu item was clicked, but the conversation is still visible in the sidebar.
What it means
The delete menu item was clicked successfully, but waitForConversationToDisappear timed out — the conversation is still present in the grok.com sidebar. The library throws CommandExecutionError because the delete cannot be confirmed, and attaches SESSION_HINT suggesting a session/auth problem in the browser session.
Source
Thrown at clis/grok/delete.js:47
columns: ['status', 'id'],
func: async (page, kwargs) => {
const id = parseGrokSessionId(kwargs.id);
const yes = normalizeBooleanFlag(kwargs.yes);
await ensureOnGrok(page);
if (!(await isLoggedIn(page))) throw authRequired();
if (!yes) {
return [{ status: 'dry-run (pass --yes to actually delete)', id }];
}
const result = await clickConversationMenuItem(page, id, ['删除', 'delete']);
if (!result || !result.ok) {
const detail = result?.detail ? ` ${result.detail}` : '';
throw new CommandExecutionError(`${result?.reason || 'Failed to click delete menu item.'}${detail}`, SESSION_HINT);
}
if (!(await waitForConversationToDisappear(page, id))) {
throw new CommandExecutionError(
'Delete menu item was clicked, but the conversation is still visible in the sidebar.',
SESSION_HINT,
);
}
return [{ status: 'deleted', id }];
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Re-run `grok list` to check whether the conversation actually disappeared (it may have been deleted after the timeout)
- Re-login and retry the delete with --yes
- Increase the disappearance poll timeout / retry once after a full page reload if deletions are slow
- If a confirmation dialog now appears, update clis/grok/utils.js to dismiss it before polling
Example fix
// before
if (!(await waitForConversationToDisappear(page, id))) {
throw new CommandExecutionError('Delete menu item was clicked, but the conversation is still visible in the sidebar.', SESSION_HINT);
}
// after
if (!(await waitForConversationToDisappear(page, id))) {
await page.reload();
if (!(await waitForConversationToDisappear(page, id))) {
throw new CommandExecutionError('Conversation still visible after reload; delete likely failed.', SESSION_HINT);
}
} Defensive patterns
Strategy: fallback
Validate before calling
// confirm login state before attempting delete
if (!(await isLoggedIn(page))) { await grokLogin(); } Type guard
async function conversationGone(page, id) {
return !(await waitForConversationToDisappear(page, id));
}
// returns true when the conversation is gone Try / catch
try {
await grokDelete(id, { yes: true });
} catch (e) {
if (String(e.message).includes('still visible in the sidebar')) {
// deletion may have landed late — verify instead of re-deleting
const still = await grokList().then(list => list.some(c => c.id === id));
if (!still) return { status: 'deleted (confirmed late)', id };
throw e;
}
throw e;
} Prevention
- After catching this error, always check `grok list` before retrying — the delete may have succeeded after the timeout
- Maintain a fresh login session so the delete mutation is not silently rejected
- Reload the page before retrying so the sidebar is not serving a stale listing
- Keep browser-automation helpers updated for Grok UI changes (confirmation dialogs, lazy sidebar refresh)
When it happens
Trigger: After clickConversationMenuItem succeeds, waitForConversationToDisappear(page, id) polls and never observes the conversation gone: the delete request silently failed server-side, a confirmation dialog blocked it, or polling timed out before the sidebar refreshed (delete.js:46-51).
Common situations: Grok showing a confirm dialog the automation did not handle; slow server-side deletion so the sidebar lags beyond the poll timeout; the deleted conversation cached in a stale sidebar listing; expired session causing the click to look successful but the mutation to be rejected.
Related errors
- grok ask response
- ${result?.reason || 'Failed to click delete menu item.'}${de
- Unexpected 12306 probe: ${JSON.stringify(probe)}
- ChatGPT did not create a conversation URL after sending the
- ChatWise response
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/8eb7643fc1e2ef00.
Report an issue: GitHub.