Skip to content

fix(terminal): add docker_extra_args to all three config-to-env bridge maps (#28863) - #28888

Closed
zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:fix/docker-extra-args-env-map
Closed

fix(terminal): add docker_extra_args to all three config-to-env bridge maps (#28863)#28888
zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:fix/docker-extra-args-env-map

Conversation

@zccyman

@zccyman zccyman commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Add docker_extra_args to all three config→env bridge maps so terminal.docker_extra_args from config.yaml actually reaches the terminal tool.

Fixes #28863

Problem

terminal.docker_extra_args in config.yaml is silently dropped. The terminal tool reads TERMINAL_DOCKER_EXTRA_ARGS (terminal_tool.py L1093), but none of the three bridge paths populated it:

  1. gateway/run.py _terminal_env_map — gateway/messaging platform startup
  2. cli.py env_mappings — CLI/TUI startup
  3. hermes_cli/config.py _config_to_env_synchermes config set one-shot

This is the same class of bug as docker_run_as_host_user and docker_mount_cwd_to_workspace before it — a new config key added to the terminal defaults (config.py L654) without updating all bridge maps.

Fix

Add "docker_extra_args": "TERMINAL_DOCKER_EXTRA_ARGS" to all three dicts. Three files, one line each.

Testing

  • Existing sync test (test_terminal_config_env_sync.py::test_cli_and_gateway_env_maps_agree) now passes (was failing before this fix)
  • 29 terminal config tests all pass, 0 failures

…aps (NousResearch#28863)

The `terminal.docker_extra_args` setting from config.yaml was silently
dropped because none of the three bridge paths included it:

1. gateway/run.py `_terminal_env_map` — gateway/messaging startup
2. cli.py `env_mappings` — CLI/TUI startup
3. hermes_cli/config.py `_config_to_env_sync` — `hermes config set` one-shot

The terminal tool reads `TERMINAL_DOCKER_EXTRA_ARGS` (terminal_tool.py
L1093) but the env var was never populated from config.yaml, making the
documented setting completely non-functional.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery area/config Config system, migrations, profiles tool/terminal Terminal execution and process management backend/docker Docker container execution P2 Medium — degraded but workaround exists labels May 19, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

#28891 is a superset of this PR — it adds both docker_extra_args and docker_forward_env to all three bridge maps (plus tests), while this PR only adds docker_extra_args. Likely superseded by #28891.

@zccyman

zccyman commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @alt-glitch. Agreed that #28891 is a superset — it adds both docker_extra_args and docker_forward_env. This PR (+3 lines) is a minimal alternative for cases where only docker_extra_args is needed. Will close if #28891 merges first.

@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.)

@benbarclay benbarclay closed this Jun 10, 2026
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

3 participants