Skip to content

CLI /new can stall at destructive confirmation and repeat prior task #24701

@Ambuletz25

Description

@Ambuletz25

Bug Description

In the interactive CLI, typing /new can stall at the destructive-command confirmation prompt and then the active agent appears to continue/repeat prior tasks instead of cleanly starting a fresh chat.

This was reported from a real WSL CLI session on Hermes Agent v0.13.0. The immediate mitigation is to choose option [2] Always Approve once, which persists approvals.destructive_slash_confirm: false and skips the prompt on future /new calls.

Steps to Reproduce

  1. Start interactive Hermes CLI.
  2. Run at least one normal task so there is active conversation state.
  3. Type /new.
  4. Observe the prompt:
    [1] Approve Once   — proceed this time only
    [2] Always Approve — proceed and silence this prompt permanently
    [3] Cancel         — keep current conversation
    Choice [1/2/3]:
    
  5. In the affected session, the CLI stalls around this prompt; after that the assistant may resume/repeat previous task execution instead of cleanly resetting.

Expected Behavior

/new should be handled atomically as a slash command. If confirmation is required, it should wait for a single explicit choice without leaking the prompt/choice interaction into the agent task queue. After confirmation, it should immediately create a clean fresh session and not repeat prior tasks.

Actual Behavior

User report: whenever /new is typed, it stalls and starts repeating tasks. The confirmation prompt appears to be implicated. Selecting option 2 permanently (Always Approve) avoids the prompt and is being used as a workaround.

Environment

  • Hermes Agent: v0.13.0 (2026.5.7)
  • Project checkout: /home/gallardo25/.hermes/hermes-agent
  • Config path: /home/gallardo25/.hermes/config.yaml
  • OS/runtime: WSL (Windows Subsystem for Linux), Python 3.11.15
  • Provider/model in affected setup: openai-codex / gpt-5.5

Relevant Code

The /new command calls _confirm_destructive_slash(...) before self.new_session(title=title):

  • cli.py around lines 7094-7103
  • _confirm_destructive_slash around lines 8651-8721

The workaround is equivalent to:

hermes config set approvals.destructive_slash_confirm false

Suggested Fix Direction

  • Ensure /new confirmation input cannot be routed to _pending_input / normal agent processing.
  • Consider making /new default to a non-interactive reset when typed as an exact slash command, or safely consume the prompt response before any queued/active task can continue.
  • Add a regression test for /new with confirmation enabled where the response 2 persists config and no user message is queued to the agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/cliCLI entry point, hermes_cli/, setup wizardtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions