Skip to content

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

Open
sgaofen wants to merge 1 commit into
NousResearch:mainfrom
sgaofen:codex/fix-14082-resume-title-prefix
Open

fix(resume): accept unique truncated title prefixes#14411
sgaofen wants to merge 1 commit into
NousResearch:mainfrom
sgaofen:codex/fix-14082-resume-title-prefix

Conversation

@sgaofen

@sgaofen sgaofen commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

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

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Alternative approach to #14098 and #14133 — instead of widening display, accepts truncated title prefixes as input. All fix #14082.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/resume fails on title match because display truncates titles to 30 chars

2 participants