{"record":{"id":"b9814db880d61860","repo":"jackwener/OpenCLI","slug":"codex-description-was-not-verified-for-conver","errorCode":null,"errorMessage":"Codex ${description} was not verified for ${conversationRefForError(ref)}.","messagePattern":"Codex (.+?) was not verified for (.+?)\\.","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/codex/_actions.js","lineNumber":240,"sourceCode":"            `${result.reason || 'Failed to perform action.'}${detail}`,\n            'Make sure Codex Desktop is running and the target conversation is selectable.',\n        );\n    }\n    return { ...result, selected };\n}\n\nexport async function waitForConversationPostcondition(page, ref, predicate, description, timeoutMs = 4000) {\n    const deadline = Date.now() + timeoutMs;\n    let lastMatch = null;\n    while (Date.now() < deadline) {\n        const projects = await readConversationProjects(page);\n        lastMatch = findCodexConversation(projects, ref);\n        if (predicate(lastMatch)) {\n            return lastMatch;\n        }\n        await page.wait(0.2);\n    }\n    throw new CommandExecutionError(\n        `Codex ${description} was not verified for ${conversationRefForError(ref)}.`,\n        'The UI action may have failed or the sidebar selectors may have drifted.',\n    );\n}\n\nexport async function setConversationPinned(page, kwargs, desiredPinned) {\n    const selected = await resolveActionConversation(page, kwargs);\n    if (selected.pinned === desiredPinned) {\n        return { status: desiredPinned ? 'already-pinned' : 'already-unpinned', selected };\n    }\n    const action = await selectAndClickAction(page, kwargs, [desiredPinned ? 'Pin chat' : 'Unpin chat']);\n    await waitForConversationPostcondition(\n        page,\n        action.selected,\n        match => match?.conversation?.pinned === desiredPinned,\n        desiredPinned ? 'pin' : 'unpin',\n    );\n    return { status: desiredPinned ? 'pinned' : 'unpinned', selected: action.selected };","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/codex/_actions.js#L222-L258","documentation":"After performing a UI action (pin or archive), waitForConversationPostcondition polls the sidebar for up to its timeout, re-extracting projects and checking a predicate (e.g. conversation now pinned/archived). If the postcondition never holds, it throws this CommandExecutionError stating the action could not be verified for the referenced conversation.","triggerScenarios":"Calling setConversationPinned or archiveConversation when the click succeeded but the sidebar state never changed within the polling window: the action silently failed, the row left the sidebar (archive), or the state attribute selectors drifted.","commonSituations":"Slow Codex UI exceeding the poll timeout, archiving the last conversation in a project so the row disappears from extraction, Codex UI update changing pinned/archived markers.","solutions":["Increase the wait/timeout and retry the action","Verify manually in the Codex UI whether the action actually took effect","Refresh the sidebar/page and re-run the command","Update opencli so its state-detection selectors match the current Codex UI"],"exampleFix":"// before\nawait archiveConversation(page, kwargs); // row disappears -> unverified\n// after\ntry {\n  await archiveConversation(page, kwargs);\n} catch (e) {\n  if (e.message.includes('was not verified')) {\n    // treat as archived: row intentionally left the sidebar\n  } else throw e;\n}","handlingStrategy":"try-catch","validationCode":"const before = await readConversationProjects(page);\nconst target = findCodexConversation(before, ref);\nif (!target || !target.conversation.threadId) {\n  throw new Error('Target conversation not verifiable before action');\n}","typeGuard":"function matchesPredicate(resolved, predicate) {\n  return Boolean(resolved && predicate(resolved));\n}","tryCatchPattern":"try {\n  await setConversationPinned(page, kwargs, true);\n} catch (e) {\n  if (e instanceof CommandExecutionError && e.message.includes('was not verified')) {\n    // verify manually or re-read sidebar state; the action may still have applied\n    const projects = await readConversationProjects(page);\n    const now = findCodexConversation(projects, kwargs);\n    if (!now?.conversation.pinned) throw e;\n  } else throw e;\n}","preventionTips":["Allow generous polling time for slow Codex UIs","Re-read sidebar state after the error before assuming the action failed","For archive actions, expect the row to leave the sidebar and handle accordingly","Track Codex UI updates that change pinned/archived markers"],"tags":["browser-automation","timeout","verification-failed"],"backgroundTag":"ui-postcondition-not-met","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}