Skip to content

[Bug]: CLI freezes after using /new command (WSL) #34140

Closed as duplicate
Closed as duplicate

Description

@J0UBERT

Bug Description

Using the /new command in an interactive Hermes session causes the terminal to become completely unresponsive. The prompt freezes and no further input is possible.

Steps to Reproduce

  1. Start Hermes with hermes
  2. Type /new (or /reset)
  3. The terminal freezes immediately after confirming the command

Expected Behavior

The current session should be reset and a fresh session should start without any UI issues or freezing.

Actual Behavior

The terminal freezes completely after running /new. No further input is accepted until the process is killed.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

Report       https://paste.rs/ZYrbf
agent.log    https://paste.rs/AZLh9
gateway.log  https://paste.rs/11ZOX

Operating System

WSL2 (Ubuntu 24.04)

Python Version

3.11.15

Hermes Version

0.15.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

The /new command calls new_session(), which performs heavy synchronous work (memory commit, multiple DB operations, memory manager hooks). Unlike /clear, it does not perform any prompt_toolkit UI reset (erase_screen, invalidate()) afterwards. This leaves the application in a broken state.

Proposed Fix (optional)

Extract the UI reset logic into a helper method _reset_cli_ui_after_session_change() and call it after both /clear and /new.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions