jackwener/OpenCLI · error · TimeoutError

Qoder response

Error message

Qoder response

What it means

Thrown as a TimeoutError when the qoder quest command sent the prompt but no assistant response text was detected within timeoutSec seconds. The library polls with qoderResponseAfterScript comparing against the pre-send turn count, and if response.text never appears it assumes generation did not finish (or the send silently failed). It instructs the user to confirm the send happened and retry with a larger --timeout.

Source

Thrown at clis/qoder/quest.js:140

        let response = null;
        while (Date.now() < deadline) {
            await new Promise((r) => setTimeout(r, 1500));
            const cur = await evaluateQoder(page, QODER_MESSAGE_COUNT_JS);
            if (cur !== lastCount) {
                lastCount = cur;
                stableTicks = 0;
            } else {
                stableTicks++;
            }
            // Consider stable after 6 idle ticks (≈9s no change) IF count grew at all.
            if (lastCount > sendBefore && stableTicks >= 6) {
                response = await evaluateQoder(page, qoderResponseAfterScript(sendBefore, text));
                if (response?.text) break;
            }
        }
        const elapsed = Math.round((Date.now() - startedAt) / 1000);
        if (!response?.text) {
            throw new TimeoutError('Qoder response', timeoutSec, 'Confirm Qoder sent the prompt and finished generating, then retry with a larger --timeout.');
        }
        return [
            { Role: 'User', Text: text, WaitedSeconds: String(elapsed) },
            { Role: response.role || 'Assistant', Text: String(response.text).slice(0, 1200), WaitedSeconds: String(elapsed) },
        ];
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Retry with a larger --timeout value (e.g. --timeout 300).
  2. Manually verify in the Qoder UI that the prompt was sent and generation completed.
  3. Check network/session validity — re-open the quest page and retry.
  4. If responses consistently fail to extract, update the QODER response-extraction selectors to match the current Qoder DOM.
  5. Reduce prompt size or split the task so generation completes faster.

Example fix

// before
qoder quest "refactor module" --timeout 60
// after
qoder quest "refactor module" --timeout 300
Defensive patterns

Strategy: retry

Validate before calling

if (Number(timeoutSec) < 120) console.warn('Qoder generation often exceeds short timeouts; consider --timeout 300');

Type guard

function hasResponse(r) { return Boolean(r && typeof r.text === 'string' && r.text.length > 0); }

Try / catch

try {
  return await quest(page, text, timeoutSec);
} catch (e) {
  if (e instanceof TimeoutError && /Qoder response/.test(e.message)) {
    return quest(page, text, timeoutSec * 2);
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling the quest command with a --timeout smaller than Qoder's generation time; the send click partially failed so no new turn was created; Qoder is rate-limited or queued; the response DOM structure changed so qoderResponseAfterScript can't extract text; the network dropped mid-generation.

Common situations: Long-running agent tasks exceeding the default timeout; Qoder under heavy load; long code-generation prompts; slow connection streaming the answer gradually; Qoder session expired so the send went nowhere.

Related errors


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