hermes - ✅(Solved) Fix [Bug]: bridge_port config not loaded into config.extra — WhatsApp bridge always uses default port 3000 [1 pull requests, 2 comments, 3 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#16521Fetched 2026-04-28 06:52:50
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Timeline (top)
labeled ×5commented ×2cross-referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

The WhatsApp bridge always spawns on port 3000 (the hardcoded default) regardless of what bridge_port is set to in config.yaml. This causes the gateway to fail with Bridge HTTP server did not start in 15s because it polls port 3000 while the existing/configured bridge is running on port 3002. The bridge_port key is simply absent from config.extra at runtime.

Fix Action

Fix / Workaround

In gateway/platforms/whatsapp.py, the bridge_port key is read from config.extra, but the config parser is not loading platform-specific keys like bridge_port, bridge_script, and session_path into config.extra. These keys should be included when building the PlatformConfig object from config.yaml. Short-term workaround: change the hardcoded default on line 168 from 3000 to match whatever port the bridge is actually running on:

pythonself._bridge_port: int = config.extra.get("bridge_port", 3002)

Proper fix: ensure the config loader passes all keys under the whatsapp: section in config.yaml through to config.extra, so user-defined values like bridge_port, bridge_script, and session_path are actually respected at runtime.

PR fix notes

PR #16584: fix(gateway): bridge WhatsApp-specific config keys into config.extra

Description (problem / solution / changelog)

Fixes NousResearch/hermes-agent#16521

Problem

Setting bridge_port under the whatsapp: section in config.yaml has no effect. The value is never loaded into config.extra, so the WhatsApp adapter always falls back to the hardcoded default of 3000.

Root Cause

The per-platform config bridging loop in gateway/config.py only forwards a hardcoded whitelist of generic keys (unauthorized_dm_behavior, reply_prefix, require_mention, etc.). WhatsApp-specific keys like bridge_port, bridge_script, session_path, and free_response_chats were not in the whitelist and were silently ignored.

Fix

Added a WhatsApp-specific block in the config bridging loop that forwards bridge_port, bridge_script, session_path, and free_response_chats from the shorthand config section into config.extra.

The WhatsApp adapter (gateway/platforms/whatsapp.py) already correctly reads these from config.extra — only the config loading was broken.

Files Changed

  • gateway/config.py — 4 lines added (WhatsApp-specific key bridging)

Changed files

  • gateway/config.py (modified, +4/-0)

Code Example

whatsapp:
  bridge_port: 3002

---

Debug report uploaded:
  Report     https://paste.rs/k0tgG
  agent.log  https://paste.rs/zouFs

---



---

pythonself._bridge_port: int = config.extra.get("bridge_port", 3002)
RAW_BUFFERClick to expand / collapse

Bug Description

Setting bridge_port under the whatsapp: section in config.yaml has no effect. The value is never loaded into config.extra, so the adapter always falls back to the hardcoded default of 3000.

Steps to Reproduce

  1. Set a custom bridge port in ~/.hermes/config.yaml:
whatsapp:
  bridge_port: 3002
  1. Run hermes gateway run
  2. The bridge spawns on port 3000, not 3002, and fails to connect

Expected Behavior

bridge_port set in config.yaml should be respected and loaded into config.extra.

Actual Behavior

The WhatsApp bridge always spawns on port 3000 (the hardcoded default) regardless of what bridge_port is set to in config.yaml. This causes the gateway to fail with Bridge HTTP server did not start in 15s because it polls port 3000 while the existing/configured bridge is running on port 3002. The bridge_port key is simply absent from config.extra at runtime.

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

WhatsApp

Debug Report

Debug report uploaded:
  Report     https://paste.rs/k0tgG
  agent.log  https://paste.rs/zouFs

Operating System

Ubuntu 24.04

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

In gateway/platforms/whatsapp.py, the bridge_port key is read from config.extra, but the config parser is not loading platform-specific keys like bridge_port, bridge_script, and session_path into config.extra. These keys should be included when building the PlatformConfig object from config.yaml. Short-term workaround: change the hardcoded default on line 168 from 3000 to match whatever port the bridge is actually running on:

pythonself._bridge_port: int = config.extra.get("bridge_port", 3002)

Proper fix: ensure the config loader passes all keys under the whatsapp: section in config.yaml through to config.extra, so user-defined values like bridge_port, bridge_script, and session_path are actually respected at runtime.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The issue can be temporarily worked around by changing the hardcoded default bridge port in whatsapp.py to match the actual port the bridge is running on.

Guidance

  • Verify that the bridge_port key is correctly set in config.yaml and that the file is being read by the application.
  • Check the gateway/platforms/whatsapp.py file to ensure that the bridge_port key is being read from config.extra and that the default value is correctly set.
  • Consider implementing a proper fix by modifying the config loader to pass all keys under the whatsapp: section in config.yaml through to config.extra.
  • Review the debug report and agent.log for any additional error messages or clues that may help resolve the issue.

Example

self._bridge_port: int = config.extra.get("bridge_port", 3002)

This code snippet shows the short-term workaround proposed in the issue description.

Notes

The actual fix will depend on the specifics of the config loader and how it handles platform-specific keys. Without more information about the config loader, it's difficult to provide a more detailed solution.

Recommendation

Apply workaround: changing the hardcoded default bridge port in whatsapp.py to match the actual port the bridge is running on, as this will allow the application to function correctly until a proper fix can be implemented.

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 [Bug]: bridge_port config not loaded into config.extra — WhatsApp bridge always uses default port 3000 [1 pull requests, 2 comments, 3 participants]