{"record":{"id":"9a791d4afe299467","repo":"NousResearch/hermes-agent","slug":"historyturns-is-only-supported-by-the-synthetic","errorCode":null,"errorMessage":"--historyTurns is only supported by the synthetic stream path","messagePattern":"--historyTurns is only supported by the synthetic stream path","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/desktop/scripts/perf/scenarios/stream.mjs","lineNumber":141,"sourceCode":"    // Realistic default: a short markdown paragraph ending in a blank line, so\n    // blocks SETTLE as they stream — exactly how real LLM output behaves, and\n    // what block-memoization is designed for (only the growing tail re-renders).\n    // A chunk with NO paragraph break (e.g. `--chunk 'word '`) instead grows one\n    // ever-larger block that re-renders fully every flush — a useful worst-case\n    // stress, but not the typical number. No raw autolink (avoids DNS/link-embed\n    // noise unrelated to render cost).\n    const chunk = opts.chunk ?? 'A streamed sentence with **bold**, `code`, and ordinary prose like a normal reply.\\n\\n'\n    const real = Boolean(opts.real)\n    const historyTurns = Number(opts.historyTurns ?? 0)\n    const historySettleMs = Number(opts.historySettleMs ?? 1500)\n\n    await cdp.send('Runtime.enable')\n\n    // Mount the settled history BEFORE the recorders start, so the measurement\n    // window contains only streaming work — not the one-off mount cost.\n    if (historyTurns > 0) {\n      if (real) {\n        throw new Error('--historyTurns is only supported by the synthetic stream path')\n      }\n\n      await cdp.eval(`window.__PERF_DRIVE__.loadTranscript(${historyTurns})`)\n      await sleep(historySettleMs)\n\n      const mounted = Number(await cdp.eval('window.__PERF_DRIVE__.snapshotMsgs()'))\n      const expected = historyTurns * 2\n\n      if (mounted !== expected) {\n        throw new Error(`expected ${expected} preloaded history messages, got ${mounted}`)\n      }\n    }\n\n    await cdp.eval(RECORDERS)\n\n    if (real) {\n      // Backend path: fire a real prompt and wait for the stream to appear.\n      const baseCount = await cdp.eval(","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/scripts/perf/scenarios/stream.mjs#L123-L159","documentation":"Error \"--historyTurns is only supported by the synthetic stream path\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/scripts/perf/scenarios/stream.mjs:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drop --historyTurns, or run the scenario with the synthetic stream path that supports it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}