The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cli): tell a secondary profile to park itself, not stop the host gateway
kshitijk4poor3a50aa9094e6
diff --git a/hermes_cli/cli_snapshot.py b/hermes_cli/cli_snapshot.pyindex 9470a512666..4f9b67c4981 100644--- a/hermes_cli/cli_snapshot.py+++ b/hermes_cli/cli_snapshot.py@@ -67,8 +67,10 @@ def _pause_owner(home, control_home, identity):else:accepted = pause_acked(pause_gateway_for_update(control_home, timeout=8), identity)if not accepted:- raise GatewayClientError("Gateway refused the snapshot maintenance handoff; nothing was restored. "- "Stop the gateway and retry.")+ # Stopping the host gateway would take down every profile it multiplexes.+ retry = (f"Park the profile with `hermes -p {home.name} gateway stop` and retry."+ if control_home != home else "Stop the gateway and retry.")+ raise GatewayClientError(f"Gateway refused the snapshot maintenance handoff; nothing was restored. {retry}")def _restore_gateway_snapshot(cli, store, snap_id):diff --git a/tests/hermes_cli/test_gateway_snapshot_restore_guards.py b/tests/hermes_cli/test_gateway_snapshot_restore_guards.pyindex 093753e3d15..c9bb952872f 100644--- a/tests/hermes_cli/test_gateway_snapshot_restore_guards.py+++ b/tests/hermes_cli/test_gateway_snapshot_restore_guards.py@@ -37,7 +37,7 @@ def _restore_error(sid):("satellite-not-reserved", lambda sid: True, "manual", "is not served again yet: host operation is still pending"),("invalid-id", lambda sid: False, "manual", "Snapshot not found: ../outside"),("other-pid-paused", None, "manual", "Gateway refused the snapshot maintenance handoff"),- ("satellite-unserve-error", None, "manual", "Gateway refused the snapshot maintenance handoff"),+ ("satellite-unserve-error", None, "manual", "nothing was restored. Park the profile with `hermes -p state"),])def test_restore_reply_follows_the_restore_not_the_rejoin(tmp_path, monkeypatch, capsys,case, restore, supervisor, expected):