NousResearch/hermes-agent

Missing RedactingFormatter import causing gateway crashes

Cluster 8044 · gateway. Data as of

2 open items. Fix merged in #8103 on 12 Apr 2026. Check it covers your case.

The short answer

0open issues
2open PRs
11items grouped
Known?
Yes. 11 related items grouped here, 4 issues already closed.
Fix event
A fix was merged to main in PR #8103. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this partially resolved, deciding PR #8103. That is separate from the fix event.
Still open
0 issues and 2 PRs.

The majority of these items concern a NameError crash caused by a missing RedactingFormatter import introduced after a logging refactor, with multiple duplicate bug reports and competing fix attempts. A smaller set of items covers related logging and CLI config display improvements.

Open issues0

No open issues.

Open PRs2

  • PR#8178fix: resolve Feishu gateway startup and config status regressions
  • PR#64049fix(cli): show all messaging platforms in config, not just Telegram/Discord

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #8103 fix(gateway): add missing RedactingFormatter import (salvage #8046)

    merged to main

    files: gateway/run.py, tests/gateway/test_runner_startup_failures.py

    Show the diff
    • gateway/run.py
      @@ -8560,6 +8560,8 @@ async def start_gateway(config: Optional[GatewayConfig] = None, replace: bool =
           # verbosity=1    (-v):         INFO and above
           # verbosity=2+   (-vv/-vvv):   DEBUG
           if verbosity is not None:
      +        from agent.redact import RedactingFormatter
      +
               _stderr_level = {0: logging.WARNING, 1: logging.INFO}.get(verbosity, logging.DEBUG)
               _stderr_handler = logging.StreamHandler()
               _stderr_handler.setLevel(_stderr_level)
    • tests/gateway/test_runner_startup_failures.py
      @@ -132,6 +132,39 @@ async def test_runner_records_connected_platform_state_on_success(monkeypatch, t
           assert state["platforms"]["discord"]["error_message"] is None
       
       
      [redacted:email]
      +async def test_start_gateway_verbosity_imports_redacting_formatter(monkeypatch, tmp_path):
      +    """Verbosity != None must not crash with NameError on RedactingFormatter (#8044)."""
      +    monkeypatch.setenv("HERMES_HOME", str(tmp_path))
      +
      +    class _CleanExitRunner:
      +        def __init__(self, config):
      +            self.config = config
      +            self.should_exit_cleanly = True
      +            self.exit_reason = None
      +            self.adapters = {}
      +
      +        async def start(self):
      +            return True
      +
      +        async def stop(self):
      +            return None
      +
      +    monkeypatch.setattr("gateway.status.get_running_pid", lambda: None)
      +    monkeypatch.setattr("tools.skills_sync.sync_skills", lambda quiet=True: None)
      +    monkeypatch.setattr("hermes_logging.setup_logging", lambda hermes_home, mode: tmp_path)
      +    monkeypatch.setattr("hermes_logging._add_rotating_handler", lambda *args, **kwargs: None)
      +    monkeypatch.setattr("gateway.run.GatewayRunner", _CleanExitRunner)
      +
      +    from gateway.run import start_gateway
      +
      +    # verbosity=1 triggers the code path that uses RedactingFormatter.
      +    # Before the fix this raised NameError.
      +    ok = await start_gateway(config=GatewayConfig(), replace=False, verbosity=1)
      +
      +    assert ok is True
      +
      +
       @pytest.mark.asyncio
       async def test_start_gateway_replace_force_uses_terminate_pid(monkeypatch, tmp_path):
           monkeypatch.setenv("HERMES_HOME", str(tmp_path))

4 PRs closed without merging

From the close comments: merged via another change 2 · done elsewhere 1 · superseded by another PR 1

  • #8046 fix(gateway): add missing RedactingFormatter import · merged via another change → #8103
  • #8092 fix: add missing RedactingFormatter import to prevent gateway crash on -v (closes #8090) · merged via another change → #8046, #8103
  • #8101 fix(gateway): restore lazy import of RedactingFormatter after #7991 · done elsewhere
  • #18914 fix(cli): expand show_config messaging platforms to include all adapters · superseded by another PR → #8178
Closed issues · 4
  • Closed#8044`NameError: name 'RedactingFormatter' is not defined` crashes Gateway on startup
  • Closed#8090`NameError: name 'RedactingFormatter' is not defined` crashes gateway on startup after #7991
  • Closed#8091[Bug]: NameError: name 'RedactingFormatter' is not defined — gateway startup crash
  • Closed#8173[Bug]: gateway startup can crash because RedactingFormatter is used without import
How this cluster was grouped
  • Link evidence (partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
  • Members outside that structural core may belong to a different underlying problem.
  • Pairwise link density 0.18: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Subsystem
gateway
Merged PRs
#8103
Closed issues
4
Attempts
4 PRs closed without merging
Fix link checked
12 Apr 2026. This confirmation is old and may be out of date (a revert or reopen would not have invalidated it here); re-verify.

For your agent

The same facts, typed.