repair-profiles
Settle session, routing, Telegram-topic and voice-mode state that landed under the wrong profile (rows in another profile's store, labels disagreeing with the session key, parent links crossing profiles, index rows for deleted profiles). Dry-run by default; --apply performs the repairs after snapshotting every store (stop the gateway first); --legacy-main rekey|move decides what agent:main rows inside a named profile's store are; --json for automation. See Sessions → Repair State Crossed Between Profiles.
From the official Hermes Agent CLI reference.