Skip to content

fix(terminal): pass docker_extra_args through _terminal_env_map (#28863) - #29236

Closed
Jiahui-Gu wants to merge 1 commit into
NousResearch:mainfrom
Jiahui-Gu:fix/docker-extra-args-bridge-28863
Closed

fix(terminal): pass docker_extra_args through _terminal_env_map (#28863)#29236
Jiahui-Gu wants to merge 1 commit into
NousResearch:mainfrom
Jiahui-Gu:fix/docker-extra-args-bridge-28863

Conversation

@Jiahui-Gu

Copy link
Copy Markdown
Contributor

Summary

Fixes #28863. terminal.docker_extra_args from config.yaml was silently dropped — terminal_tool._get_env_config and DockerEnvironment both consume the env var, but the three bridges that copy config-yaml keys into env vars (gateway/run.py::_terminal_env_map, cli.py::env_mappings, hermes_cli/config.py::_config_to_env_sync) were missing the entry. So users setting terminal.docker_extra_args via config.yaml or hermes config set saw no effect.

Fix

  • gateway/run.py: add docker_extra_args → TERMINAL_DOCKER_EXTRA_ARGS to _terminal_env_map
  • cli.py: same mapping in env_mappings (keeps cli ↔ gateway key sets in sync — otherwise the existing drift guard test fails)
  • hermes_cli/config.py: same in _config_to_env_sync so hermes config set terminal.docker_extra_args ... writes to .env like the sibling keys

Static verification: all three maps now contain docker_extra_args; cli ↔ gateway key set diff is empty.

Test plan

  • New test_docker_extra_args_is_bridged_everywhere in tests/tools/test_terminal_config_env_sync.py: mirrors the existing docker_run_as_host_user / docker_env four-point pins (cli / gateway / save / terminal_tool)

🤖 Generated with Claude Code

…Research#28863)

terminal.docker_extra_args from config.yaml was silently dropped because
the gateway/run.py _terminal_env_map, cli.py env_mappings, and
hermes_cli/config.py _config_to_env_sync bridges all omitted the key.
terminal_tool already reads TERMINAL_DOCKER_EXTRA_ARGS and
DockerEnvironment appends the parsed list to docker run args, so the
documented hardening escape hatch (--read-only, --security-opt, custom
--tmpfs) was a no-op without any warning.

Adds docker_extra_args to all three bridges plus a regression-pin test
mirroring the docker_run_as_host_user / docker_env guards.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles backend/docker Docker container execution labels May 20, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #28891 (superset) and #28888 — all three add docker_extra_args to the config-env bridge maps. #28891 also adds docker_forward_env.

@Jiahui-Gu

Copy link
Copy Markdown
Contributor Author

Closing in favor of #28891 (superset, also adds docker_forward_env) and #28888. Releasing review bandwidth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles backend/docker Docker container execution comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

terminal.docker_extra_args from config.yaml silently dropped — missing in _terminal_env_map bridge

3 participants