hermes - ✅(Solved) Fix openclaw migration: 3 issues (whatsapp config dropped, --overwrite appends providers, stale gateway PID) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#18097Fetched 2026-05-01 05:53:52
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #18111: fix(migration): preserve OpenClaw WhatsApp config

Description (problem / solution / changelog)

Summary

  • Add an explicit OpenClaw whatsapp-config migration item that writes Hermes whatsapp: channel policy settings to config.yaml
  • Upsert existing custom_providers entries by provider name when --overwrite is used instead of appending duplicates
  • Keep the change scoped to the OpenClaw migration script and regression tests

Root cause

  • The migration only exported WhatsApp allowlists to .env; unlike Discord, compatible channel policy fields were never copied into Hermes config.
  • migrate_full_providers() detected existing provider names only in the non-overwrite path, so overwrite mode always appended a second entry.
  • The stale gateway PID part of the issue does not reproduce on current origin/main: gateway/status.py already verifies os.kill(pid, 0), process start time, and gateway identity before returning a running PID.

Fix

  • Map compatible OpenClaw WhatsApp fields (enabled, dmPolicy, groupPolicy, sendReadReceipts, ackReaction, mention settings) into Hermes snake_case config keys.
  • Respect conflict handling when --overwrite is not set, and merge/update when it is set.
  • Replace matching custom provider entries in overwrite mode instead of appending a duplicate.

Regression coverage

  • Added a regression test for migrating a populated channels.whatsapp block into config.yaml.
  • Added a regression test that --overwrite upserts an existing claude-max custom provider without duplicating it.

Testing

  • scripts/run_tests.sh tests/skills/test_openclaw_migration.py::test_migrator_ports_whatsapp_channel_config tests/skills/test_openclaw_migration.py::test_full_providers_overwrite_upserts_existing_custom_provider -q
  • scripts/run_tests.sh tests/skills/test_openclaw_migration.py tests/skills/test_openclaw_migration_hardening.py -q

Closes #18097

Changed files

  • optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py (modified, +70/-4)
  • tests/skills/test_openclaw_migration.py (modified, +43/-0)

Code Example

whatsapp: {}

---

"whatsapp": {
  "enabled": true,
  "dmPolicy": "open",
  "allowFrom": ["*"],
  "groupPolicy": "open",
  "sendReadReceipts": true,
  "ackReaction": {"emoji": "👀", "direct": true, "group": "mentions"}
}

---

Gateway is running (PID: <stale_pid>)
RAW_BUFFERClick to expand / collapse

Found three issues running hermes claw migrate --overwrite --migrate-secrets against a real OpenClaw install.

Environment

  • Hermes Agent v0.12.0 (2026.4.30)
  • Linux 6.17, Python 3.11.15, OpenAI SDK 2.32.0
  • Source: optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py

1) WhatsApp channel block is silently dropped during migration

channels.whatsapp from openclaw.json is not written into whatsapp: in config.yaml, even though Discord's channel config IS migrated. After migration:

whatsapp: {}

Source openclaw.json had:

"whatsapp": {
  "enabled": true,
  "dmPolicy": "open",
  "allowFrom": ["*"],
  "groupPolicy": "open",
  "sendReadReceipts": true,
  "ackReaction": {"emoji": "👀", "direct": true, "group": "mentions"}
}

--migrate-secrets does bring WHATSAPP_ALLOWED_USERS into .env, but the channel block itself is never ported. Result: WhatsApp is effectively disabled post-migration even when the user had it configured. Expected: a whatsapp-config migration item analogous to whatever migrates the Discord side.


2) --overwrite on full-providers appends instead of upserting

Re-running with --overwrite against a config.yaml that already had a claude-max entry under custom_providers: produced a duplicate entry (same name twice, contents identical). YAML still parses, but the migrator should upsert by provider name.

Repro: have custom_providers.claude-max already defined → run hermes claw migrate --overwrite --migrate-secrets → observe claude-max listed twice.


3) hermes gateway status reports stale PIDs as running

After a transient hermes gateway run subprocess exited, hermes gateway status still reported:

✓ Gateway is running (PID: <stale_pid>)

…but kill -0 <stale_pid> failed and nothing was bound on the gateway port. Suggested fix: kill -0 the PID (or read /proc/<pid>/comm to confirm it's the gateway binary) before reporting "running".


Happy to PR fixes if maintainers want — flagging first.

extent analysis

TL;DR

The most likely fix involves modifying the migration script to properly handle WhatsApp channel configuration and custom providers, as well as updating the gateway status check to verify running processes.

Guidance

  • Verify that the openclaw_to_hermes.py script is correctly parsing the openclaw.json file and migrating the WhatsApp channel configuration to config.yaml.
  • Update the migration script to upsert custom providers by name instead of appending duplicates when using the --overwrite flag.
  • Modify the hermes gateway status command to check if the reported PID is actually running by using kill -0 or reading /proc/<pid>/comm before reporting the gateway as running.

Example

# Example of upserting custom providers by name
def upsert_provider(providers, name, config):
    for provider in providers:
        if provider['name'] == name:
            provider.update(config)
            return
    providers.append({'name': name, **config})

Notes

The provided information suggests that the issues are related to the migration script and the gateway status check. However, without more context or code, it's difficult to provide a complete solution.

Recommendation

Apply workaround: Modify the migration script and gateway status check as suggested above to fix the identified issues. This approach allows for targeted fixes without requiring a full version upgrade.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix openclaw migration: 3 issues (whatsapp config dropped, --overwrite appends providers, stale gateway PID) [1 pull requests, 1 participants]