feat(terminal): wire docker_network through docker backend - #4922
Closed
malaiwah wants to merge 2 commits into
Closed
feat(terminal): wire docker_network through docker backend#4922malaiwah wants to merge 2 commits into
malaiwah wants to merge 2 commits into
Conversation
1 task
Contributor
Author
|
Validation note:
|
cli.py and hermes_cli/config.py now map terminal.docker_network to TERMINAL_DOCKER_NETWORK for CLI invocations (hermes chat, etc.), but gateway/run.py has its own _terminal_env_map that bridges config.yaml to env vars for the hermes gateway run path (i.e. the long-running Telegram/WhatsApp bot process). Without this change, docker_network set in config.yaml has no effect when Hermes is started as a gateway — sandbox containers silently fall back to the default network and cannot resolve sibling service hostnames like hermes-litellm. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 tasks
This was referenced May 16, 2026
Contributor
|
Closing — this functionality landed on main via PR #59149 (salvage of #46358): terminal.docker_network is now bridged through cli.py, gateway/run.py, and hermes_cli/config.py, wired through the terminal/file/code-exec container paths, and guarded on container reuse. You had the same wiring idea back in April and were the first to submit it — sorry it sat this long, and thanks for the contribution. |
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.
What does this PR do?
Adds
terminal.docker_networkfor the Docker terminal backend and wires it through todocker run --network <name>when set.This makes it possible to run Hermes on a specific Docker/Podman network so sandbox containers can resolve and talk to sibling services on that network. The behavior stays conservative: empty/unset keeps the current default behavior, and
network=Falsestill wins and forces--network=none.Related Issue
Fixes #4921
Type of Change
Changes Made
terminal.docker_networkto config defaults and config-to-env syncTERMINAL_DOCKER_NETWORKthrough CLI config loading and terminal tool config parsingterminal_tool()intoDockerEnvironmentnetwork=Falsestill overrides a named networkHow to Test
terminal.backendtodocker.terminal.docker_networkto a named Docker network such ashermes-net.DockerEnvironment(..., network=False, docker_network="hermes-net")still uses--network=none.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Focused validation is green:
python -m pytest tests/tools/test_parse_env_var.py tests/tools/test_docker_environment.py tests/tools/test_modal_sandbox_fixes.py tests/hermes_cli/test_set_config_value.py -q73 passedI also ran
python -m pytest tests/ -q, but the full suite does not currently pass cleanly in this checkout. The failures I saw were outside the files touched in this PR.