Skip to content

fix: Implement /resume slash command (Issue #2869)#2893

Open
ten-jampa wants to merge 1 commit intoNousResearch:mainfrom
ten-jampa:fix-resume-command
Open

fix: Implement /resume slash command (Issue #2869)#2893
ten-jampa wants to merge 1 commit intoNousResearch:mainfrom
ten-jampa:fix-resume-command

Conversation

@ten-jampa
Copy link
Contributor

Summary

Fixes Issue #2869: Session history not persisting between restarts

Problem

When Hermes was closed and reopened, showed empty and showed "Unknown command" - session history was not persisting between restarts.

Root Cause

The command was registered in the command registry but not implemented as a slash command handler - it only worked via the CLI flag when starting Hermes.

Solution

  1. Add slash command handler in :

    • — Lists available saved sessions
    • — Resumes that session and loads history from the database
  2. Improve command:

    • Now loads history from database if not in current session
    • Shows saved sessions when no history is available
    • Provides helpful prompt to use
  3. Fix NoneType crash:

    • Handle explicitly null field in session listing to prevent error

Testing

hermes
/resume              # Lists saved sessions
/resume <session-id> # Resumes session with full history
/history             # Shows history from database

Files Changed

  • — Added /resume handler, improved /history, fixed NoneType handling

Issue NousResearch#2869: Session history not persisting between restarts

Root cause: The /resume command was registered but not implemented
as a slash command - only worked via --resume CLI flag.

Changes:
1. Add /resume slash command handler in cli.py
   - Lists available sessions when used without args
   - Resumes specified session and loads history from DB

2. Improve /history command
   - Loads history from database if not in current session
   - Shows saved sessions when no history available

3. Fix NoneType crash in session listing
   - Handle explicitly null title to prevent 'NoneType is not subscriptable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant