The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cli): the paused notice says Hermes couldn't confirm how the turn ended, and names the /discard <id> form
Tekniumb2c92e2153f9
diff --git a/hermes_cli/cli_chat_turn_mixin.py b/hermes_cli/cli_chat_turn_mixin.pyindex 76b6e5489fb..2926ef8ee57 100644--- a/hermes_cli/cli_chat_turn_mixin.py+++ b/hermes_cli/cli_chat_turn_mixin.py@@ -532,7 +532,7 @@ class CLIChatTurnMixin:except GatewayClientError as exc:_cprint(f" /discard: {exc}")return- _cprint(" Dropped the unfinished turn. Send your message again.")+ _cprint(" Dropped the turn. Send your message again.")def _chat_render_turn(self, turn, agent_thread, interrupt_msg):"""Post-turn display: errors, interrupt marker, reasoning/response panels, bell, re-queues.diff --git a/hermes_cli/gateway_chat_view.py b/hermes_cli/gateway_chat_view.pyindex 572098178d2..2dc306e2007 100644--- a/hermes_cli/gateway_chat_view.py+++ b/hermes_cli/gateway_chat_view.py@@ -26,8 +26,8 @@ def _pending_preview(text):return f' "{line}"' if line else ""-_UNKNOWN_OUTCOME = ("Hermes restarted before this turn finished, so how far it got is unknown. "- "Resume this session to check, then type /discard to drop it. "+_UNKNOWN_OUTCOME = ("Hermes couldn't confirm how this turn ended (usually because it restarted mid-turn). "+ "Resume this session and use the /discard <id> command it shows to drop the turn. ""Don't send the same message again until you've checked.")_BLOCKING_CONTROL_EVENTS = frozenset({@@ -45,9 +45,9 @@ def pending_lines(pending):lines = []if lost:one = len(lost) == 1- lines.append("⏸ This chat is paused. Hermes restarted while "- + ("a turn was running, so it never finished:" if one- else f"{len(lost)} turns were running, so they never finished:"))+ lines.append("⏸ This chat is paused. Hermes couldn't confirm how "+ + ("the last turn ended" if one else f"{len(lost)} turns ended")+ + " (usually because it restarted mid-turn):")why = (f" Hermes won't re-run {'it' if one else 'them'} by itself, since {'it' if one else 'they'} ""may already have done part of the work.")if one:@@ -469,7 +469,7 @@ class GatewayChatView:self.completions[admission] = {"outcome": "unknown", "text": _UNKNOWN_OUTCOME}return Noneif own == "queued" and self.unknown_admissions():- return ("This chat is paused behind a turn that never finished when Hermes restarted. "+ return ("This chat is paused behind a turn whose ending Hermes couldn't confirm. ""Your message is saved and will run once you resume this session and /discard ""that turn; don't send it again.")if self.prompts and (own or not self.gaps): # a control blocks only a turn still pendingdiff --git a/tests/hermes_cli/test_gateway_chat_view_replay_gap.py b/tests/hermes_cli/test_gateway_chat_view_replay_gap.pyindex 0fb15fed66f..67dcaba6733 100644--- a/tests/hermes_cli/test_gateway_chat_view_replay_gap.py+++ b/tests/hermes_cli/test_gateway_chat_view_replay_gap.py@@ -100,7 +100,7 @@ async def test_unknown_row_settles_the_interactive_turn(capsys):return view.failureview, failure = await gapped(answer, interactive)assert failure is None and view.completions["a"]["outcome"] == "unknown"- assert "how far it got is unknown" in capsys.readouterr().out+ assert "couldn't confirm how this turn ended" in capsys.readouterr().out@pytest.mark.asyncio