Skip to content

fix: update session_log_file during context compression#3835

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-b2abefdf
Mar 30, 2026
Merged

fix: update session_log_file during context compression#3835
teknium1 merged 1 commit intomainfrom
hermes/hermes-b2abefdf

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

When context compression creates a child session with a new session_id, session_log_file was still pointing to the old session's JSON file. This caused _save_session_log() to write new data to the wrong file.

Bug verified: After compression changes self.session_id, self.session_log_file retained the old path — confirmed by instantiating AIAgent, simulating the session_id change, and checking the file path.

Fix: +2 lines following the existing pattern from __init__ (line 883).

Salvaged from PR #3731 by @kelsia14 with authorship preserved.

When compression creates a child session with a new session_id,
session_log_file was still pointing to the old session's JSON file.
This caused _save_session_log() to write new data to the wrong file.

Closes #3731.
@teknium1 teknium1 merged commit d6b7836 into main Mar 30, 2026
4 of 5 checks passed
itsXactlY pushed a commit to itsXactlY/hermes-agent that referenced this pull request Mar 30, 2026
…#3835)

When compression creates a child session with a new session_id,
session_log_file was still pointing to the old session's JSON file.
This caused _save_session_log() to write new data to the wrong file.

Closes NousResearch#3731.

Co-authored-by: kelsia14 <kelsia14@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants