hermes - ✅(Solved) Fix /fork only copies ~15 messages instead of full history [1 pull requests, 1 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#18870Fetched 2026-05-03 04:53:52
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #18891: fix(cli,gateway): /branch preserves full history after compression

Description (problem / solution / changelog)

Problem

/branch (aka /fork) only copies ~15 messages instead of the full conversation history when context compression has occurred.

Root cause: After context compression, the CLI's in-memory conversation_history is replaced with a compressed summary. Both the CLI and gateway /branch handlers copy from this truncated source instead of loading the full message chain from SQLite.

Fix

Load messages from the DB with include_ancestors=True so the branched session gets the complete transcript across compression boundaries. Falls back to in-memory history if the DB load fails.

Files changed:

  • cli.py_handle_branch_command(): load full lineage from DB
  • gateway/run.py_handle_branch_command(): same fix for gateway

Testing

  • All 16 existing branch tests pass (tests/cli/test_branch_command.py)
  • Pre-existing async test failures in test_session_boundary_security_state.py are unrelated (missing pytest-asyncio plugin)

Fixes #18870

Changed files

  • cli.py (modified, +19/-3)
  • gateway/run.py (modified, +18/-3)
RAW_BUFFERClick to expand / collapse

Steps:

  1. Start a conversation with 100+ messages
  2. At the bottom, run /fork
  3. New session only has ~15 messages Expected: Full conversation copied Actual: Only 15 messages

extent analysis

TL;DR

The issue can likely be resolved by adjusting the message limit or pagination when forking a conversation.

Guidance

  • Verify the current message limit setting to see if it's set to 15 by default.
  • Check if there's a pagination option available when running the /fork command to retrieve more messages.
  • Investigate if there's a configuration setting to increase the default message limit for forked conversations.
  • Test the /fork command with a smaller conversation to see if the issue is specific to large conversations.

Notes

The exact solution may depend on the specific implementation of the /fork command and the conversation system, which is not fully described in the issue.

Recommendation

Apply workaround: Adjust the message limit or pagination settings to retrieve the full conversation, as upgrading to a fixed version is not mentioned in the issue.

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 /fork only copies ~15 messages instead of full history [1 pull requests, 1 participants]