Bug Description
After recent destructive slash confirmation UX changes, using /clear or /new in the interactive CLI shows the expected confirmation prompt, but then emits:
RuntimeWarning: coroutine 'run_in_terminal.<locals>.run' was never awaited
and logs:
cli.py:12438 logger.warning("process_loop unhandled error (msg may be lost): %s", e)
The confirmation prompt appears intentional; the RuntimeWarning appears to be a regression in the CLI input path.
Steps to Reproduce
- Start interactive CLI: hermes
- Ensure confirmations are enabled:
approvals.destructive_slash_confirm: true
- Run /clear (or /new)
- Confirmation prompt appears with choices [1]/[2]/[3]
- Choose 1 (Approve Once) or 2 (Always Approve)
- Observe RuntimeWarning:
coroutine 'run_in_terminal..run' was never awaited
Expected Behavior
/clear and /new should complete (or cancel) without coroutine warnings or unhandled-error logs.
Actual Behavior
Prompt is shown, but CLI emits RuntimeWarning about unawaited coroutine via run_in_terminal path.
Affected Component
CLI (interactive chat)
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Report https://paste.rs/wO2TT
agent.log https://paste.rs/7zuVL
gateway.log https://paste.rs/cB3qY
Operating System
Ubuntu 26.0.4
Python Version
3.11.15
Hermes Version
Hermes Agent v0.13.0 (2026.5.7)
Additional Logs / Traceback (optional)
/home/username/.hermes/hermes-agent/cli.py:12438: RuntimeWarning: coroutine 'run_in_terminal.<locals>.run' was never awaited
logger.warning("process_loop unhandled error (msg may be lost): %s", e)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Root Cause Analysis (optional)
Likely mismatch with prompt_toolkit API contract in current dependency:
- prompt_toolkit 3.0.52 run_in_terminal(...) -> Awaitable[_T]
- cli.py _prompt_text_input currently calls run_in_terminal(_ask) without await.
- /clear and /new now route through _confirm_destructive_slash (commit b9c0011...), which calls _prompt_text_input, making this path frequent.
Relevant code/commits:
Proposed Fix (optional)
Update CLI call sites to handle run_in_terminal as awaitable in prompt_toolkit>=3.0.52 (especially _prompt_text_input and _run_curses_picker, plus other run_in_terminal call sites).
Temporary Workaround
From CLI...
hermes config set approvals.destructive_slash_confirm false
Are you willing to submit a PR for this?
Bug Description
Steps to Reproduce
approvals.destructive_slash_confirm: true
coroutine 'run_in_terminal..run' was never awaited
Expected Behavior
/clear and /new should complete (or cancel) without coroutine warnings or unhandled-error logs.
Actual Behavior
Prompt is shown, but CLI emits RuntimeWarning about unawaited coroutine via run_in_terminal path.
Affected Component
CLI (interactive chat)
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Operating System
Ubuntu 26.0.4
Python Version
3.11.15
Hermes Version
Hermes Agent v0.13.0 (2026.5.7)
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
Likely mismatch with prompt_toolkit API contract in current dependency:
Relevant code/commits:
feat: confirm prompt for destructive slash commands ([UX] No confirmation for destructive slash commands (/clear, /reset, /new, /undo) #4069) (feat: confirm prompt for destructive slash commands (#4069) #22687)
Added _confirm_destructive_slash and wired /clear,/new,/undo
feat(cli): add native /model picker modal for provider → model selection
Introduced _prompt_text_input with run_in_terminal(_ask) unawaited usage
Proposed Fix (optional)
Update CLI call sites to handle run_in_terminal as awaitable in prompt_toolkit>=3.0.52 (especially _prompt_text_input and _run_curses_picker, plus other run_in_terminal call sites).
Temporary Workaround
From CLI...
hermes config set approvals.destructive_slash_confirm falseAre you willing to submit a PR for this?