jackwener/OpenCLI · error · CommandExecutionError

Kimi message submission was not verified

Error message

Kimi message submission was not verified

What it means

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.

Source

Thrown at clis/kimi/chat.js:293

    if (!typeRes?.ok) throw new CommandExecutionError(typeRes?.reason || 'composer type failed', '');
    await page.wait(0.3);
    const sendRes = await page.evaluate(clickBySvgNameScript('Send'));
    if (!sendRes?.ok) throw new CommandExecutionError(sendRes?.reason || 'Send button click failed', '');

    const deadline = Date.now() + 3000;
    while (Date.now() < deadline) {
        const verified = await page.evaluate(`(() => {
      const normalize = (value) => String(value || '').replace(/\\u00a0/g, ' ').replace(/\\s+/g, ' ').trim();
      const prompt = normalize(${JSON.stringify(prompt)});
      const before = Number(${JSON.stringify(beforeUsers)}) || 0;
      const rows = Array.from(document.querySelectorAll('.chat-content-list .chat-content-item, .message-list > *, .segment'))
        .filter((row) => /user|sent-by-user|me-/i.test(String(row.className || '')));
      return rows.slice(before).some((row) => normalize(row.innerText || row.textContent).includes(prompt));
    })()`);
        if (verified) return { prompt };
        await page.wait(0.2);
    }
    throw new CommandExecutionError(
        'Kimi message submission was not verified',
        'The prompt was injected and Send was clicked, but no new user turn containing that prompt appeared.',
    );
}

// -------- send --------
cli({
    site: 'kimi',
    name: 'send',
    access: 'write',
    description: 'Send a message in the current Kimi chat (fire-and-forget; does not wait for reply).',
    domain: KIMI_DOMAIN,
    strategy: Strategy.COOKIE,
    browser: true,
    siteSession: 'persistent',
    navigateBefore: false,
    args: [
        { name: 'text', positional: true, required: true, help: 'Message text' },

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Retry the send — transient latency can exceed the 3s verification window.
  2. Call kimi read after a longer wait to check whether the message actually posted despite failed verification.
  3. Send shorter/simpler text to rule out normalization mismatches.
  4. Check for rate limits or moderation blocks in the Kimi UI; extend the verification deadline if latency is consistently high.

Example fix

// before
await cli('kimi', 'send', { text: longMarkdown });
// after
try {
  await cli('kimi', 'send', { text: longMarkdown });
} catch (e) {
  await page.wait(3); // allow delayed round-trip
  await cli('kimi', 'read'); // confirm whether it actually posted
}
Defensive patterns

Strategy: try-catch

Type guard

function submissionVerified(result) { return result && typeof result.prompt === 'string'; }

Try / catch

try {
  await cli('kimi', 'send', { text });
} catch (e) {
  if (/not verified/i.test(e.message)) {
    await page.wait(3);
    const turns = await cli('kimi', 'read', { conv });
    const posted = turns.some(t => t.Role === 'User' && t.Text.includes(text.slice(0, 50)));
    if (!posted) throw e; // genuinely failed; optionally re-send
    return; // posted, verification just missed it
  }
  throw e;
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/bf9cb048900b3bc6. Report an issue: GitHub.