Skip to content

fix(cli): defer destructive slash resets until active turns exit#24722

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-24701-destructive-slash-reset
Open

fix(cli): defer destructive slash resets until active turns exit#24722
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-24701-destructive-slash-reset

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • defer destructive slash commands like /new, /clear, /reset, and /undo when the CLI is in the middle of an active turn
  • interrupt the current turn without turning the slash command itself into queued interrupt text, then run the destructive command only after chat() fully unwinds
  • add regression coverage for the new deferred-command path and keep the existing destructive-confirmation tests green

Fixes #24701.

Testing

  • uv sync --frozen --extra all
  • uv run --frozen pytest tests/cli/test_destructive_slash_confirm.py tests/cli/test_cli_new_session.py tests/cli/test_prompt_text_input_thread_safety.py
  • uv run --frozen ruff check .
  • uv run --frozen python scripts/check-windows-footguns.py --all
  • git diff --check

Attribution

  • local lint-diff replay still surfaces repo-wide ty noise, but it did not report new diagnostics on this diff's changed cli.py ranges or the new regression test file; treated as preexisting_unrelated

@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 May 13, 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.

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

2 participants