Skip to content

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

@kshitijk4poor

Description

@kshitijk4poor

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 " 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/cliCLI entry point, hermes_cli/, setup wizardtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions