{"record":{"id":"cca350e2ad3d200f","repo":"NousResearch/hermes-agent","slug":"gateway-not-connected","errorCode":null,"errorMessage":"Gateway not connected","messagePattern":"Gateway not connected","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/lib/oneshot.ts","lineNumber":41,"sourceCode":"  maxTokens?: number\n  temperature?: number\n  /**\n   * Session whose model to inherit. Defaults to the active session so output\n   * matches the model the user is coding with; pass null to force the\n   * configured auxiliary backend instead.\n   */\n  sessionId?: string | null\n}\n\n/**\n * Send a one-off request to Hermes and return the generated text.\n * Throws when the gateway is offline or the backend reports an error.\n */\nexport async function requestOneShot(req: OneShotRequest): Promise<string> {\n  const gateway = $gateway.get()\n\n  if (!gateway) {\n    throw new Error('Gateway not connected')\n  }\n\n  const sessionId = req.sessionId === undefined ? $activeSessionId.get() : req.sessionId\n\n  const result = await gateway.request<{ text?: string }>('llm.oneshot', {\n    input: req.input,\n    instructions: req.instructions,\n    max_tokens: req.maxTokens,\n    session_id: sessionId ?? undefined,\n    task: req.task,\n    temperature: req.temperature,\n    template: req.template,\n    variables: req.variables\n  })\n\n  return (result?.text ?? '').trim()\n}\n","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/lib/oneshot.ts#L23-L59","documentation":"Error \"Gateway not connected\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/lib/oneshot.ts:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Connect to the Hermes gateway before running the oneshot.","Restart the backend or reconnect from Settings → Gateway, then retry."],"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-15T22:17:37.221Z"}