NousResearch/hermes-agent · error · Error

No active session to restore.

Error message

No active session to restore.

What it means

Error "No active session to restore." thrown in NousResearch/hermes-agent.

Source

Thrown at apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts:896

          storedSessionId: selectedStoredSessionIdRef.current,
          onSessionRecovered: recoveredId => {
            activeSessionIdRef.current = recoveredId
            setActiveSessionId(recoveredId)
          }
        },
        truncateRowId
      ),
    [activeSessionIdRef, requestGateway, selectedStoredSessionIdRef]
  )

  const restoreToMessage = useCallback(
    async (messageId: string, target?: RestoreMessageTarget) => {
      // Ref, not the closure-captured prop — a rewind is destructive, so a
      // stale target truncates a conversation the user did not ask to rewind.
      const sessionId = activeSessionIdRef.current

      if (!sessionId) {
        throw new Error('No active session to restore.')
      }

      const messages = $messages.get()
      const plan = planRestore(messages, messageId, target)

      // The turns we're discarding may have spawned todos and background
      // processes; they belong to the abandoned timeline, so wipe their status
      // rows (and kill the live processes) before the fresh run repopulates.
      clearSessionTodos(sessionId)
      resetSessionBackground(sessionId)
      clearPreviewArtifacts(sessionId)

      clearNotifications()
      setMutableRef(busyRef, true)
      setBusy(true)
      setAwaitingResponse(true)
      updateSessionState(sessionId, state => applyRewindOptimistic(state, plan.sourceIndex))

View on GitHub (pinned to c896c09c42)

Solutions

  1. Select or open a session before using restore.
  2. Refresh the session list and retry once a session is active.

When it happens

Trigger: Thrown at apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts:896 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/f95a91efb78ac6f9. Report an issue: GitHub.