Skip to content

fix(gateway): honor configured goal turn budget#19423

Closed
paul-tian wants to merge 1 commit into
NousResearch:mainfrom
paul-tian:fix/gateway-goal-max-turns-config
Closed

fix(gateway): honor configured goal turn budget#19423
paul-tian wants to merge 1 commit into
NousResearch:mainfrom
paul-tian:fix/gateway-goal-max-turns-config

Conversation

@paul-tian
Copy link
Copy Markdown

Summary

  • fix gateway /goal to honor top-level goals.max_turns from config.yaml
  • keep the existing fallback to 20 when no goal budget is configured
  • add a regression test covering the gateway path with GatewayConfig, which does not carry the full top-level config

Test plan

  • ./venv/bin/python -m py_compile gateway/run.py tests/gateway/test_goal_max_turns_config.py
  • ./venv/bin/python -m pytest tests/gateway/test_goal_max_turns_config.py tests/tui_gateway/test_goal_command.py -q

Notes

The CLI goal path already loads the full user config. The gateway path receives a GatewayConfig dataclass, so the top-level goals block needs to be loaded from the full config before falling back to the default budget.

@paul-tian paul-tian force-pushed the fix/gateway-goal-max-turns-config branch from 1bf1196 to 35bbd53 Compare May 3, 2026 23:57
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery area/config Config system, migrations, profiles labels May 4, 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 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.

2 participants