jackwener/OpenCLI · warning · TimeoutError

${result.message} Check muted words before retrying; the wor

Error message

${result.message} Check muted words before retrying; the word may already have been added.

What it means

TimeoutError('twitter mute-word confirmation', 5, ...) thrown when the in-page script attempted to add the muted keyword but could not confirm success within the 5-attempt/timeout budget, AND writeStarted is true — meaning the write may have partially gone through. The extra message tells the user to check existing muted words first because a duplicate add is a common cause of the confirmation never appearing.

Source

Thrown at clis/twitter/mute-word.js:169

                    await sleep(250);
                    if (beforePath !== '/settings/muted_keywords' && location.pathname === '/settings/muted_keywords') {
                        return { ok: true, message: 'Muted word added.' };
                    }
                    if (hasNewSuccessToast(beforeToasts)) {
                        return { ok: true, message: 'Muted word added.' };
                    }
                    if (hasNewExactKeywordRow(beforeRows)) {
                        return { ok: true, message: 'Muted word added.' };
                    }
                }
                return { ok: false, unconfirmed: true, message: 'Muted word submission did not show confirmation.' };
            } catch (error) {
                return { ok: false, unconfirmed: writeStarted, message: String(error?.message || error) };
            }
        })()`);

        if (result?.unconfirmed) {
            throw new TimeoutError(
                'twitter mute-word confirmation',
                5,
                `${result.message} Check muted words before retrying; the word may already have been added.`,
            );
        }
        if (!result?.ok) {
            throw new CommandExecutionError(
                result?.message || 'Could not add muted word.',
                'Nothing changed. Open Twitter/X muted word settings in the browser and retry.',
            );
        }

        return [{
            keyword,
            status: 'success',
            message: result.message || 'Muted word added.',
        }];
    },

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Open https://x.com/settings/muted_keywords and check whether the keyword is already muted; if it is, the operation effectively succeeded — do not retry.
  2. Re-run the command once; if it was a transient slow render it should confirm the second time (watch for a duplicate).
  3. Remove the existing muted keyword first if you need a clean re-add, then run the command again.
  4. If persistent, increase the confirmation timeout or verify the confirmation selector still matches the current X UI, and report a selector drift bug.

Example fix

// before
await addMutedKeyword(keyword); // retry blindly on timeout -> duplicates
// after
const muted = await listMutedKeywords();
if (muted.includes(keyword)) {
  console.log(`${keyword} already muted; skipping add`);
} else {
  await addMutedKeyword(keyword);
}
Defensive patterns

Strategy: retry

Validate before calling

const existing = await listMutedKeywords();
if (existing.includes(keyword)) {
  console.log(`${keyword} already muted; skipping`);
  return;
}

Type guard

function isUnconfirmedTimeout(err) {
  return err instanceof TimeoutError && err.message.includes('Check muted words before retrying');
}

Try / catch

try {
  await run(['twitter', 'mute-word', kw]);
} catch (err) {
  if (isUnconfirmedTimeout(err)) {
    const muted = await listMutedKeywords();
    if (muted.includes(kw)) console.log(`${kw} was muted despite timeout`);
    else throw err;
  } else throw err;
}

Prevention

When it happens

Trigger: page.evaluate in-page script returned { ok: false, unconfirmed: true, message } — e.g. the 'Add' button was clicked (writeStarted) but the success toast/row for the new keyword never rendered within the confirmation window, often because the keyword was already muted or the settings page rendered slowly.

Common situations: Re-running the command for a keyword that was already muted in a previous (possibly timed-out) run; slow X.com renders on poor connections; Twitter UI changes moving the confirmation element; flaky network causing the toast to be missed.

Related errors


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