Skip to content

fix(cli): surface recent sessions inside /history and /resume (salvage #4448) - #4734

Closed
teknium1 wants to merge 1 commit into
mainfrom
hermes/hermes-5deaba3e
Closed

fix(cli): surface recent sessions inside /history and /resume (salvage #4448)#4734
teknium1 wants to merge 1 commit into
mainfrom
hermes/hermes-5deaba3e

Conversation

@teknium1

@teknium1 teknium1 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Salvage of #4448 by @kshitijk4poor — cherry-picked onto current main with cleanup.

When /history is used in an empty chat, instead of a dead-end "(._.) No conversation history yet" message, it now shows a compact table of recent resumable sessions. Similarly, /resume with no argument shows the same table with resume guidance.

Changes

  • _list_recent_sessions() — fetches recent CLI sessions from SessionDB, excludes current session
  • _show_recent_sessions() — renders an inline session table (title, preview, last active, ID)
  • show_history() — shows recent sessions when current chat is empty
  • _handle_resume_command() — shows recent sessions when no target is provided

Cleanup from original PR

  • Removed redundant exclude_sources=["tool"] — already filtered by source="cli"
  • Fixed off-center table header (was 25/46 padding, now uses .center(86))

Tests

  • 2 new tests in test_cli_init.py covering both paths
  • Full suite: no regressions (5000+ tests, all pre-existing failures only)

When /history is used in an empty chat, show a table of recent
resumable sessions instead of a dead-end message. When /resume is
called with no argument, show the same table with resume guidance.

- Add _list_recent_sessions() and _show_recent_sessions() to HermesCLI
- Remove redundant exclude_sources (already filtered by source='cli')
- Center the table header properly

Cherry-picked from PR #4448.
@teknium1

teknium1 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

Already merged via commit 4d99305 by the other agent. Closing as redundant.

@teknium1 teknium1 closed this Apr 3, 2026
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.

2 participants