Files
hermes-agent/apps
Teknium c1c8543a13 fix(gateway): --detach keeps --force, covers --all, and older runtimes still restart
Review follow-ups on the detached stale-gateway restart:

- `restart --force --detach` launched `gateway run --quiet` without `--force`, so a named
  profile under a multiplexer (the case --force exists for) had its old owner stopped and
  its replacement exit on the run-side guard. spawn_unmanaged_gateway now carries `force`.
- `restart --all --detach` from the root profile with no service still ran the host
  gateway in the caller (`_restart_all_as_host` -> run_gateway). It now takes the detached
  `_spawn_detached_gateway` path the named-profile case already uses (`--replace` argv).
- Desktop can resolve a runtime older than `--detach`; argparse rejects the flag (exit 2)
  and nothing restarted, which also broke the Models-page restart for service-backed
  installs. runGatewayOwnerRestart retries without the flag only when the runtime names
  `--detach` as unrecognized (apps/desktop/AGENTS.md "Compatibility").

test_named_profile_restart_all_reaches_the_all_aware_branch: its `_restart_all` stub
takes the new `detach` argument; the assertion is unchanged.
2026-10-21 00:16:22 -07:00
..