Skip to content

fix: show full last assistant response when resuming a session - #8724

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-162e2955
Apr 13, 2026
Merged

fix: show full last assistant response when resuming a session#8724
teknium1 merged 1 commit into
mainfrom
hermes/hermes-162e2955

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

When resuming a session with --resume or -c, the last assistant response was truncated to 200 chars / 3 lines — identical to older messages in the recap. Users had to waste tokens re-asking "resend your latest response" just to see where they left off.

Now the last assistant message in the recap panel is shown in full with non-dim styling, making it visually distinct and immediately readable. Earlier messages remain compact.

Reported by @uzairansar.

Changes

cli.py_display_resumed_history():

  • Track un-truncated text (_last_asst_full) alongside truncated entries during collection
  • After history trimming, replace the last assistant entry with its full version using the assistant_last role tag
  • Render assistant_last entries with bold, non-dim styling so the last response stands out from the dim recap

tests/cli/test_resume_display.py:

  • Updated test_long_assistant_message_truncated and test_multiline_assistant_truncated to use multi-turn histories (testing non-last message truncation)
  • Added test_last_assistant_response_shown_in_full — 500-char response shown without truncation
  • Added test_last_assistant_multiline_shown_in_full — 20-line response shows all lines

Test plan

python -m pytest tests/cli/test_resume_display.py -n0 -q  # 29 passed

Resume a session and verify the last response appears in full:

hermes -c  # or hermes --resume <session_id>

When resuming a session with --resume or -c, the last assistant response
was truncated to 200 chars / 3 lines just like older messages in the recap.
This forced users to waste tokens re-asking for the response.

Now the last assistant message in the recap is shown in full with non-dim
styling, so users can see exactly where they left off. Earlier messages
remain truncated for compact display.

Changes:
- Track un-truncated text for the last assistant entry during collection
- Replace last entry with full text after history trimming
- Render last assistant entry with bold (non-dim) styling
- Update existing truncation tests to use multi-message histories
- Add new tests for full last response display (char + multiline)
@teknium1
teknium1 merged commit 5fae356 into main Apr 13, 2026
2 of 4 checks passed
@teknium1
teknium1 deleted the hermes/hermes-162e2955 branch April 13, 2026 02:07
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
…esearch#8724)

When resuming a session with --resume or -c, the last assistant response
was truncated to 200 chars / 3 lines just like older messages in the recap.
This forced users to waste tokens re-asking for the response.

Now the last assistant message in the recap is shown in full with non-dim
styling, so users can see exactly where they left off. Earlier messages
remain truncated for compact display.

Changes:
- Track un-truncated text for the last assistant entry during collection
- Replace last entry with full text after history trimming
- Render last assistant entry with bold (non-dim) styling
- Update existing truncation tests to use multi-message histories
- Add new tests for full last response display (char + multiline)
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…esearch#8724)

When resuming a session with --resume or -c, the last assistant response
was truncated to 200 chars / 3 lines just like older messages in the recap.
This forced users to waste tokens re-asking for the response.

Now the last assistant message in the recap is shown in full with non-dim
styling, so users can see exactly where they left off. Earlier messages
remain truncated for compact display.

Changes:
- Track un-truncated text for the last assistant entry during collection
- Replace last entry with full text after history trimming
- Render last assistant entry with bold (non-dim) styling
- Update existing truncation tests to use multi-message histories
- Add new tests for full last response display (char + multiline)
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…esearch#8724)

When resuming a session with --resume or -c, the last assistant response
was truncated to 200 chars / 3 lines just like older messages in the recap.
This forced users to waste tokens re-asking for the response.

Now the last assistant message in the recap is shown in full with non-dim
styling, so users can see exactly where they left off. Earlier messages
remain truncated for compact display.

Changes:
- Track un-truncated text for the last assistant entry during collection
- Replace last entry with full text after history trimming
- Render last assistant entry with bold (non-dim) styling
- Update existing truncation tests to use multi-message histories
- Add new tests for full last response display (char + multiline)
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