{"record":{"id":"ee628be30cfaa256","repo":"jackwener/OpenCLI","slug":"codex-send-was-not-verified","errorCode":null,"errorMessage":"Codex send was not verified.","messagePattern":"Codex send was not verified\\.","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/codex/send.js","lineNumber":231,"sourceCode":"            // still-loaded composer is either the untouched draft or the chip\n            // the picker resolved. Anything else was rewritten: never submit.\n            const slashToken = /^\\/\\S+$/.test(textToInsert) ? textToInsert.slice(1) : '';\n            const chipLabel = picked ? picked.title : slashToken;\n            const unchangedDraft = state.chips.length === 0 && state.text === String(textToInsert).trim();\n            const pickerResolvedCommand = chipLabel !== ''\n                && state.chips.length === 1\n                && state.nonChipText === ''\n                && chipMatchesLabel(state.chips[0], chipLabel);\n            if (!unchangedDraft && !pickerResolvedCommand) {\n                throw new CommandExecutionError(\n                    'Codex send was not submitted.',\n                    `The composer now holds ${describeComposerState(state)}. Re-run with --pick <label> or press Escape in Codex first.`,\n                );\n            }\n            await page.pressKey('Enter');\n            state = await pollComposerState(page);\n            if (state.text) {\n                throw new CommandExecutionError('Codex send was not verified.', `The composer still holds an unsent draft: ${describeComposerState(state)}`);\n            }\n        }\n        return [\n            {\n                Status: 'Success',\n                Project: selected?.project || '',\n                Conversation: selected?.conversation || '',\n                InjectedText: textToInsert,\n            },\n        ];\n    },\n});\n","sourceCodeStart":213,"sourceCodeEnd":244,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/codex/send.js#L213-L244","documentation":"After the second Enter (submitting the draft/command), the library polls the composer state; a successful send empties the composer. If `state.text` is still non-empty, the draft was not sent and this error is thrown, distinguishing a silent failed submit from a false success.","triggerScenarios":"`pollComposerState` still reports text in the composer after Enter — Enter was swallowed (focus not on composer), Codex rejected the send (e.g. backend busy), a modal intercepted the keypress, or the composer retained residual text.","commonSituations":"Codex lost composer focus after a picker interaction; network/backend issue prevented submission; a Codex dialog (e.g. confirm/upgrade prompt) stole the Enter key; very long draft triggered client-side throttling.","solutions":["Re-run the send after confirming the Codex window is focused and idle.","Dismiss any modal/dialog blocking the composer, then retry.","Check Codex connectivity/backend health if the draft consistently fails to send.","Clear the composer (Escape) and retry to rule out a stuck draft state."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await codexSend({ text });\n} catch (e) {\n  if (String(e.message).includes('send was not verified')) {\n    // ensure window focus, dismiss modals, then retry\n    await bringToFront(page);\n    await codexSend({ text });\n  } else throw e;\n}","preventionTips":["Keep the Codex window focused during automated sends.","Dismiss any Codex modals/dialogs before sending.","Check Codex backend connectivity if sends consistently fail.","Clear stuck drafts with Escape before retrying."],"tags":["codex","composer","send","verification"],"backgroundTag":"send-not-confirmed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}