{"record":{"id":"f95a91efb78ac6f9","repo":"NousResearch/hermes-agent","slug":"no-active-session-to-restore","errorCode":null,"errorMessage":"No active session to restore.","messagePattern":"No active session to restore\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts","lineNumber":896,"sourceCode":"          storedSessionId: selectedStoredSessionIdRef.current,\n          onSessionRecovered: recoveredId => {\n            activeSessionIdRef.current = recoveredId\n            setActiveSessionId(recoveredId)\n          }\n        },\n        truncateRowId\n      ),\n    [activeSessionIdRef, requestGateway, selectedStoredSessionIdRef]\n  )\n\n  const restoreToMessage = useCallback(\n    async (messageId: string, target?: RestoreMessageTarget) => {\n      // Ref, not the closure-captured prop — a rewind is destructive, so a\n      // stale target truncates a conversation the user did not ask to rewind.\n      const sessionId = activeSessionIdRef.current\n\n      if (!sessionId) {\n        throw new Error('No active session to restore.')\n      }\n\n      const messages = $messages.get()\n      const plan = planRestore(messages, messageId, target)\n\n      // The turns we're discarding may have spawned todos and background\n      // processes; they belong to the abandoned timeline, so wipe their status\n      // rows (and kill the live processes) before the fresh run repopulates.\n      clearSessionTodos(sessionId)\n      resetSessionBackground(sessionId)\n      clearPreviewArtifacts(sessionId)\n\n      clearNotifications()\n      setMutableRef(busyRef, true)\n      setBusy(true)\n      setAwaitingResponse(true)\n      updateSessionState(sessionId, state => applyRewindOptimistic(state, plan.sourceIndex))\n","sourceCodeStart":878,"sourceCodeEnd":914,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts#L878-L914","documentation":"Error \"No active session to restore.\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts:896 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Select or open a session before using restore.","Refresh the session list and retry once a session is active."],"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"}