Skip to content

fix(cli): Docker cleanup config propagation - #75296

Open
MichaelHuangXiaofei wants to merge 1 commit into
NousResearch:mainfrom
MichaelHuangXiaofei:fix/docker-config-propagation
Open

fix(cli): Docker cleanup config propagation#75296
MichaelHuangXiaofei wants to merge 1 commit into
NousResearch:mainfrom
MichaelHuangXiaofei:fix/docker-config-propagation

Conversation

@MichaelHuangXiaofei

Copy link
Copy Markdown

Fixes #75291

What changed

  • Forward docker_persist_across_processes from file-tool and execute_code Docker creation paths.
  • Forward docker_orphan_reaper through the same paths.
  • Add regression coverage for both entry points.

Root cause

Both paths built a partial container_config. The missing settings fell back to terminal_tool defaults, so an explicit docker_persist_across_processes: false was silently treated as true, leaving the container running and reusable.

Validation

  • venv\\Scripts\\python.exe -m pytest tests/tools/test_docker_config_propagation.py tests/tools/test_docker_orphan_reaper_integration.py -q
  • Result: 7 passed

@MichaelHuangXiaofei MichaelHuangXiaofei changed the title [codex] Fix Docker cleanup config propagation Fix Docker cleanup config propagation Jul 31, 2026
@MichaelHuangXiaofei MichaelHuangXiaofei changed the title Fix Docker cleanup config propagation fix(desktop): Docker cleanup config propagation Jul 31, 2026
@MichaelHuangXiaofei
MichaelHuangXiaofei marked this pull request as ready for review July 31, 2026 07:26
@MichaelHuangXiaofei MichaelHuangXiaofei changed the title fix(desktop): Docker cleanup config propagation fix(cli): Docker cleanup config propagation Jul 31, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracing both creation paths. The lifecycle propagation premise is confirmed on current main: tools/code_execution_tool.py:771 and tools/file_tools.py:1046 omit these flags, while tools/terminal_tool.py:1596-1609 defaults omitted values to true.

Problems

  • tools/file_tools.py:96 and tools/file_tools.py:1288 contain unrelated accidental line splits that corrupt the existing next_offset comments.

Suggested changes

  • Restore those two comments unchanged; the two container_config additions and regression coverage otherwise address the verified missing paths. The other source creation paths already forward both values (agent/prompt_builder.py:1086-1087, tools/terminal_tool.py:2389-2390).

Automated hermes-sweeper review.

Comment thread tools/file_tools.py
that fits within ``max_chars`` and reports how many lines were kept so
the caller can offer a ``next_offset`` continuation.
the caller can offer a `
ext_offset`` continuation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unrelated newline corrupts the existing next_offset comment. Please restore it unchanged; the same accidental split also appears at new-side line 1288.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 31, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/file File tools (read, write, patch, search) tool/code-exec execute_code sandbox backend/docker Docker container execution area/docker Docker image, Compose, packaging labels Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docker Docker image, Compose, packaging backend/docker Docker container execution P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/code-exec execute_code sandbox tool/file File tools (read, write, patch, search) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: (docker) honor cleanup settings in file and code execution tools

3 participants