fix(gateway): import RedactingFormatter missing after logging refactor#8273
Open
MaybeRichard wants to merge 1 commit intoNousResearch:mainfrom
Open
fix(gateway): import RedactingFormatter missing after logging refactor#8273MaybeRichard wants to merge 1 commit intoNousResearch:mainfrom
MaybeRichard wants to merge 1 commit intoNousResearch:mainfrom
Conversation
Commit fd73937 refactored the logging setup but accidentally removed the `from agent.redact import RedactingFormatter` import that was inside the `if verbosity is not None:` block. Since the default verbosity is 0 (not None), the block is always entered and the missing import causes a NameError on startup, preventing the gateway from running entirely. Fix by importing RedactingFormatter at the top of start_gateway() alongside the other logging imports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dishadc
approved these changes
Apr 12, 2026
dishadc
left a comment
There was a problem hiding this comment.
Reviewed locally: confirmed the missing import is required for the stderr formatter path in start_gateway(), and targeted pytest checks passed (tests/agent/test_redact.py plus selected gateway/cron tests).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Commit fd73937 refactored the logging setup but accidentally removed the
from agent.redact import RedactingFormatterimport that was inside theif verbosity is not None:block.Since
verbositydefaults to0(notNone) — seegateway.py:1537:verbosity = None if quiet else verbose— this block is always entered on a normal gateway start, causing an immediateNameErrorthat prevents the gateway from running at all.Fix
Move
from agent.redact import RedactingFormatterto the top ofstart_gateway(), alongside the other logging imports, so it is always available regardless of verbosity.Steps to reproduce
Install hermes after fd73937 and run
hermes gateway run— the gateway crashes immediately on startup.