{"record":{"id":"bf9cb048900b3bc6","repo":"jackwener/OpenCLI","slug":"kimi-message-submission-was-not-verified","errorCode":null,"errorMessage":"Kimi message submission was not verified","messagePattern":"Kimi message submission was not verified","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/kimi/chat.js","lineNumber":293,"sourceCode":"    if (!typeRes?.ok) throw new CommandExecutionError(typeRes?.reason || 'composer type failed', '');\n    await page.wait(0.3);\n    const sendRes = await page.evaluate(clickBySvgNameScript('Send'));\n    if (!sendRes?.ok) throw new CommandExecutionError(sendRes?.reason || 'Send button click failed', '');\n\n    const deadline = Date.now() + 3000;\n    while (Date.now() < deadline) {\n        const verified = await page.evaluate(`(() => {\n      const normalize = (value) => String(value || '').replace(/\\\\u00a0/g, ' ').replace(/\\\\s+/g, ' ').trim();\n      const prompt = normalize(${JSON.stringify(prompt)});\n      const before = Number(${JSON.stringify(beforeUsers)}) || 0;\n      const rows = Array.from(document.querySelectorAll('.chat-content-list .chat-content-item, .message-list > *, .segment'))\n        .filter((row) => /user|sent-by-user|me-/i.test(String(row.className || '')));\n      return rows.slice(before).some((row) => normalize(row.innerText || row.textContent).includes(prompt));\n    })()`);\n        if (verified) return { prompt };\n        await page.wait(0.2);\n    }\n    throw new CommandExecutionError(\n        'Kimi message submission was not verified',\n        'The prompt was injected and Send was clicked, but no new user turn containing that prompt appeared.',\n    );\n}\n\n// -------- send --------\ncli({\n    site: 'kimi',\n    name: 'send',\n    access: 'write',\n    description: 'Send a message in the current Kimi chat (fire-and-forget; does not wait for reply).',\n    domain: KIMI_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,\n    args: [\n        { name: 'text', positional: true, required: true, help: 'Message text' },","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/kimi/chat.js#L275-L311","documentation":"After typing and clicking Send, sendKimiMessage polls for ~3s for a new user turn whose text contains the submitted prompt. If verification never succeeds, this CommandExecutionError is thrown with the note that injection and click happened but no matching new turn appeared.","triggerScenarios":"Send click was a no-op (button disabled), the message text was normalized differently than the DOM renders it (whitespace/nbsp differences beyond the normalizer), a slow/network-delayed round-trip exceeding the 3s deadline, or Kimi rejected the submission (quota/moderation).","commonSituations":"Sending long or heavily formatted text where the rendered turn truncates differently; rate limiting silently blocking the message; flaky network causing >3s latency; Kimi UI change to user-turn class names breaking the matcher.","solutions":["Retry the send — transient latency can exceed the 3s verification window.","Call kimi read after a longer wait to check whether the message actually posted despite failed verification.","Send shorter/simpler text to rule out normalization mismatches.","Check for rate limits or moderation blocks in the Kimi UI; extend the verification deadline if latency is consistently high."],"exampleFix":"// before\nawait cli('kimi', 'send', { text: longMarkdown });\n// after\ntry {\n  await cli('kimi', 'send', { text: longMarkdown });\n} catch (e) {\n  await page.wait(3); // allow delayed round-trip\n  await cli('kimi', 'read'); // confirm whether it actually posted\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function submissionVerified(result) { return result && typeof result.prompt === 'string'; }","tryCatchPattern":"try {\n  await cli('kimi', 'send', { text });\n} catch (e) {\n  if (/not verified/i.test(e.message)) {\n    await page.wait(3);\n    const turns = await cli('kimi', 'read', { conv });\n    const posted = turns.some(t => t.Role === 'User' && t.Text.includes(text.slice(0, 50)));\n    if (!posted) throw e; // genuinely failed; optionally re-send\n    return; // posted, verification just missed it\n  }\n  throw e;\n}","preventionTips":["Send short, plain text when possible to ease normalization matching.","Account for >3s latency on slow networks; follow up with kimi read.","Watch for rate limits/moderation that silently block submission.","Avoid duplicate re-sends: verify with read before retrying send."],"tags":["command-execution","verification-timeout","kimi"],"backgroundTag":"send-verification-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}