Skip to content

fix #11030: create branch session before ending original session#11048

Open
vominh1919 wants to merge 1 commit into
NousResearch:mainfrom
vominh1919:fix/11030-branch-session-transaction
Open

fix #11030: create branch session before ending original session#11048
vominh1919 wants to merge 1 commit into
NousResearch:mainfrom
vominh1919:fix/11030-branch-session-transaction

Conversation

@vominh1919

Copy link
Copy Markdown
Contributor

Fixes #11030

/branch marked the original session as ended with end_reason="branched" BEFORE creating the new session. If create_session() failed, the original session was left in an inconsistent state (ended but still active).

Changes:

  • Moved create_session() call BEFORE end_session()
  • If create_session() fails, the original session remains active
  • Only ends the original session after the new one is successfully created

…session

/branch marked the original session as ended with end_reason='branched'
BEFORE creating the new session. If create_session() failed, the original
session was left in an inconsistent state (ended but still active).

Now creates the new session first, and only ends the original on success.

Fixes NousResearch#11030
@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 25, 2026
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.

[Bug]: /branch can end the original session even when creating the branch session fails

2 participants