Skip to content

fix(gateway): bridge terminal.docker_extra_args and docker_forward_env to env#28891

Closed
Shizoqua wants to merge 1 commit into
NousResearch:mainfrom
Shizoqua:fix/terminal-docker-extra-args-env-bridge
Closed

fix(gateway): bridge terminal.docker_extra_args and docker_forward_env to env#28891
Shizoqua wants to merge 1 commit into
NousResearch:mainfrom
Shizoqua:fix/terminal-docker-extra-args-env-bridge

Conversation

@Shizoqua

Copy link
Copy Markdown

gateway/run.py's _terminal_env_map omitted docker_extra_args and docker_forward_env, so values set via hermes config set or written directly to config.yaml were silently dropped before terminal_tool could read the corresponding env vars. The documented Docker hardening path (--read-only, --security-opt, custom --tmpfs) was non-functional on the YAML path; operators had to bypass it by exporting env vars in .env directly.

This adds both keys to the bridge dict and to _config_to_env_sync in hermes_cli/config.py so config set writes them correctly too.

Fixes #28863

…v to env

gateway/run.py's _terminal_env_map omitted docker_extra_args and
docker_forward_env, so values set via hermes config set or written
directly to config.yaml were silently dropped before terminal_tool
could read the corresponding env vars. The documented Docker hardening
path (--read-only, --security-opt, custom --tmpfs) was non-functional
on the YAML path; operators had to bypass it by exporting env vars in
.env directly.

This adds both keys to the bridge dict and to _config_to_env_sync in
hermes_cli/config.py so config set writes them correctly too.

Fixes NousResearch#28863
@benbarclay

Copy link
Copy Markdown
Collaborator

Closing as obsolete — the terminal.docker_* config→env bridge this adds is already complete and test-pinned on main. Both bridge maps carry the docker keys (cli.py env_mappings and gateway/run.py _terminal_env_map), and tests/tools/test_terminal_config_env_sync.py pins them via test_docker_extra_args_is_bridged_everywhere / test_docker_env_is_bridged_everywhere / test_docker_forward_env_is_bridged_everywhere / test_docker_volumes_is_bridged_everywhere (all passing). So terminal.docker_extra_args / docker_env / docker_forward_env set in config.yaml already reach TERMINAL_DOCKER_* for both CLI/TUI and gateway sessions. Thanks for the contribution — the gap it targeted has since been closed in-tree.

(Note for maintainers: the consumer-side gap where code_execution/file_tools sandboxes drop docker_env/docker_extra_args is a separate issue, tracked via #35937 — not closed here.)

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 tool/terminal Terminal execution and process management 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

4 participants