NousResearch/hermes-agent · error · Error
expected ${expected} preloaded history messages, got ${mount
Error message
expected ${expected} preloaded history messages, got ${mounted} What it means
Error "expected ${expected} preloaded history messages, got ${mounted}" thrown in NousResearch/hermes-agent.
Source
Thrown at apps/desktop/scripts/perf/scenarios/stream.mjs:151
const historySettleMs = Number(opts.historySettleMs ?? 1500)
await cdp.send('Runtime.enable')
// Mount the settled history BEFORE the recorders start, so the measurement
// window contains only streaming work — not the one-off mount cost.
if (historyTurns > 0) {
if (real) {
throw new Error('--historyTurns is only supported by the synthetic stream path')
}
await cdp.eval(`window.__PERF_DRIVE__.loadTranscript(${historyTurns})`)
await sleep(historySettleMs)
const mounted = Number(await cdp.eval('window.__PERF_DRIVE__.snapshotMsgs()'))
const expected = historyTurns * 2
if (mounted !== expected) {
throw new Error(`expected ${expected} preloaded history messages, got ${mounted}`)
}
}
await cdp.eval(RECORDERS)
if (real) {
// Backend path: fire a real prompt and wait for the stream to appear.
const baseCount = await cdp.eval(
`document.querySelectorAll(${JSON.stringify(SELECTORS.assistantMessage)}).length`
)
await typeIntoComposer(cdp, opts.prompt ?? 'count from 1 to 80, one number per line', { cps: 40 })
await cdp.eval(`(() => {
const el = document.querySelector(${JSON.stringify(SELECTORS.composer)})
el && el.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', code: 'Enter', bubbles: true, cancelable: true }))
})()`)
const deadline = Date.now() + Number(opts.timeoutMs ?? 60000)
let started = falseView on GitHub (pinned to c896c09c42)
Solutions
- Check the synthetic history setup; fewer messages mounted than requested.
- Verify the session preload data matches the expected message count and rerun.
When it happens
Trigger: Thrown at apps/desktop/scripts/perf/scenarios/stream.mjs:151 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/1d0ae134ae709d2a.
Report an issue: GitHub.