hermes - ✅(Solved) Fix /resume fails on title match because display truncates titles to 30 chars [3 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#14082Fetched 2026-04-23 07:46:52
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
cross-referenced ×3labeled ×3commented ×2

Root Cause

Two things combine:

  1. cli.py:4428_show_recent_sessions() truncates titles to 30 chars: title = (session.get("title") or "—")[:30]
  2. hermes_state.py:657get_session_by_title() does exact match: WHERE title = ?

The display tells users to "Use /resume <session id or title>" but shows truncated titles that will never match.

Fix Action

Fixed

PR fix notes

PR #14098: fix(cli): show full titles in /resume session list

Description (problem / solution / changelog)

Summary

  • show full session titles in the inline /resume list instead of truncating them to 30 characters
  • keep the existing exact title/session ID lookup unchanged so users can copy either visible value directly
  • add CLI regression coverage for long titles in the recent session list

Testing

  • pytest -o addopts='' tests/cli/test_cli_init.py

Fixes #14082

Changed files

  • cli.py (modified, +1/-1)
  • tests/cli/test_cli_init.py (modified, +26/-0)

PR #14133: fix(cli): show full titles in /resume list instead of silently truncating

Description (problem / solution / changelog)

Closes #14082


The recent-sessions list that /resume (and /history with an empty current chat) renders was truncating each title to 30 characters so it fit a fixed-width table column. The helper text under the list tells users to "Use /resume <session id or title>", but the title shown there would never match because resolve_session_by_title requires an exact match. So copy-pasting the displayed title resulted in "Session not found".

The fix swaps the fixed-column table for a two-line-per-session layout:

  Salvage BytePlus Volcengine PR With Fixes
    id: 20260420_120000_abcdef  ·  2h ago  ·  wiring up the missing unit tests

Each session occupies its own block: the full title on the first line, then the session id, relative last-active, and a capped preview on the second. Users can now copy either the title or the id and /resume will resolve it. The preview is still bounded (100 chars) so long summaries don't blow up the list.

Covered by a regression test that feeds a >30-char title into _show_recent_sessions and asserts the full title (not a truncated variant) appears in the output. The existing tests for the short-title case continue to pass.

Disclaimer: this contribution was prepared with AI-agent assistance.

Changed files

  • cli.py (modified, +16/-6)
  • tests/cli/test_cli_init.py (modified, +28/-0)

PR #14411: fix(resume): accept unique truncated title prefixes

Description (problem / solution / changelog)

Summary

Fixes #14082.

This lets /resume <title> recover sessions when the user copies the width-limited title shown by the recent-session list.

Root cause

/resume tells users they can resume by session ID or title, but the recent-session table truncates titles. The resolver only accepted exact title matches (plus lineage suffixes), so copying the displayed title prefix failed with Session not found.

Fix

  • Preserve the existing exact-title and numbered-lineage behavior.
  • If exact/lineage resolution fails, accept a unique title prefix.
  • Keep ambiguous prefixes unresolved so Hermes does not jump to the wrong session.
  • Guard blank title input so it cannot prefix-match arbitrary sessions.

Validation

  • /Users/stephenyu/Documents/hermes-agent/.venv/bin/python -m pytest tests/test_hermes_state.py::TestTitleLineage::test_resolve_blank_title_returns_none tests/test_hermes_state.py::TestTitleLineage::test_resolve_unique_title_prefix_from_truncated_display tests/test_hermes_state.py::TestTitleLineage::test_resolve_ambiguous_title_prefix_returns_none tests/test_hermes_state.py::TestTitleLineage::test_resolve_exact_title tests/test_hermes_state.py::TestTitleLineage::test_resolve_returns_latest_numbered tests/test_hermes_state.py::TestTitleSqlWildcards::test_resolve_title_with_percent tests/test_hermes_state.py::TestTitleSqlWildcards::test_resolve_title_with_underscore -q --tb=short
  • /Users/stephenyu/Documents/hermes-agent/.venv/bin/python -m pytest tests/test_hermes_state.py -q --tb=short
  • git diff --check

Changed files

  • hermes_state.py (modified, +18/-1)
  • tests/test_hermes_state.py (modified, +21/-1)
RAW_BUFFERClick to expand / collapse

Bug Description

/resume <title> fails with "Session not found" when the user copies a title from the /resume session list, because the list truncates titles to 30 characters but the lookup requires an exact match.

Steps to Reproduce

  1. Have a session with a long title, e.g. "Salvage BytePlus Volcengine PR With Fixes"
  2. Run /resume with no args — the session list shows the title truncated to 30 chars: Salvage BytePlus Volcengine PR
  3. Run /resume Salvage BytePlus Volcengine PR
  4. Get: Session not found: Salvage BytePlus Volcengine PR

Root Cause

Two things combine:

  1. cli.py:4428_show_recent_sessions() truncates titles to 30 chars: title = (session.get("title") or "—")[:30]
  2. hermes_state.py:657get_session_by_title() does exact match: WHERE title = ?

The display tells users to "Use /resume <session id or title>" but shows truncated titles that will never match.

Suggested Fix

Show the full title and session ID in the /resume list so users can copy either one reliably. The table formatting can wrap or use a different layout for long titles instead of silently truncating them.

Alternatively (or additionally), resolve_session_by_title could use prefix matching as a fallback when exact match fails, but showing the full info is the simpler and more predictable fix.

extent analysis

TL;DR

Displaying the full title and session ID in the /resume list or implementing prefix matching in resolve_session_by_title can fix the "Session not found" issue.

Guidance

  • Modify the _show_recent_sessions() function in cli.py to display the full title instead of truncating it to 30 characters.
  • Consider using a different layout or table formatting to accommodate long titles without truncation.
  • As an alternative, update the get_session_by_title() function in hermes_state.py to use prefix matching as a fallback when an exact match fails.
  • Verify the fix by running the /resume command with a session having a long title and checking if the full title is displayed and can be used to resume the session.

Example

# Modified _show_recent_sessions() function
def _show_recent_sessions():
    # ...
    title = session.get("title") or "—"
    # Remove the truncation
    # title = title[:30]
    # ...

Notes

The suggested fix assumes that displaying the full title and session ID is feasible and does not cause any usability issues. The alternative approach of using prefix matching may require additional testing to ensure it works correctly in all scenarios.

Recommendation

Apply the workaround of displaying the full title and session ID in the /resume list, as it is a simpler and more predictable fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix /resume fails on title match because display truncates titles to 30 chars [3 pull requests, 2 comments, 2 participants]