Skip to content

fix: honor network.force_ipv4 on run_agent and legacy cli bootstrap - #82634

Closed
hekwweiss89 wants to merge 1 commit into
NousResearch:mainfrom
hekwweiss89:fix/force-ipv4-bootstrap
Closed

fix: honor network.force_ipv4 on run_agent and legacy cli bootstrap#82634
hekwweiss89 wants to merge 1 commit into
NousResearch:mainfrom
hekwweiss89:fix/force-ipv4-bootstrap

Conversation

@hekwweiss89

Copy link
Copy Markdown

Summary

  • add apply_configured_ipv4_preference() to read network.force_ipv4 from config.yaml, guard non-mapping YAML roots, and honor managed-scope overlays
  • call it from run_agent.py and legacy cli.py bootstrap so hermes-agent / python cli.py match the hermes CLI workaround for broken IPv6 hangs
  • extend IPv4 preference tests for config loading, scalar/list roots, managed overlay, and both entry points

Context

network.force_ipv4 was already applied in hermes_cli/main.py, gateway, and cron, but not in the run_agent / legacy CLI entry paths (#37662). This is a salvage of #37818 addressing the review feedback (mapping guard + managed-scope overlay).

Testing

  • scripts/run_tests.sh tests/test_ipv4_preference.py -q → 13 passed

Fixes #37662

apply_configured_ipv4_preference reads config.yaml (with managed-scope
overlay and non-mapping root guards) and patches socket.getaddrinfo so
hermes-agent / python cli.py match the hermes CLI workaround for broken
IPv6 hangs. Extends regression coverage for config loading and both
entry points.

Addresses #37662 review feedback on #37818.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 9, 2026
@hekwweiss89

Copy link
Copy Markdown
Author

Closing — opened by mistake.

@hekwweiss89 hekwweiss89 closed this Aug 9, 2026
@hekwweiss89
hekwweiss89 deleted the fix/force-ipv4-bootstrap branch August 9, 2026 18:10
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 comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

httpx/OpenAI SDK hangs on IPv6 when connecting to provider endpoints (e.g. opencode.ai) — suggest happy-eyeballs fix

2 participants