fix: support /reasoning --global and cron reasoning overrides - #14617
fix: support /reasoning --global and cron reasoning overrides#14617Alex-giao wants to merge 1 commit into
Conversation
- share reasoning arg parsing across CLI, gateway, and TUI - keep session-scoped reasoning overrides separate from persisted global config - let cron jobs override reasoning_effort per job with config fallback - add focused regression tests for reasoning and cron behavior
teknium1
left a comment
There was a problem hiding this comment.
Thanks for covering all three interactive surfaces plus cron. The underlying gaps still exist on current main: CLI does not parse --global (hermes_cli/cli_commands_mixin.py:2481), TUI does not parse it (tui_gateway/server.py:10531), and cron reads only global reasoning effort (cron/scheduler.py:2865).
Problems
- The implementation predates command extraction: the live handlers are now
hermes_cli/cli_commands_mixin.py:2469andgateway/slash_commands.py:2634, so thecli.pyandgateway/run.pyhunks need a behavioral port rather than direct conflict resolution. - The cron field is added only to
cronjob; current cron also has CLI, API, and web creation/update paths. Those need the same validated field and documentation for a complete per-job feature.
Suggested changes
- Port the TUI logic to current
create_reasoning_override/_make_agent(..., reasoning_config_override=...)flow (tui_gateway/server.py:4461,tui_gateway/server.py:10540). - Preserve the existing CLI
full/clampbranches while adding flag parsing.
Automated hermes-sweeper review.
| @@ -459,6 +464,10 @@ def cronjob( | |||
| "type": "string", | |||
There was a problem hiding this comment.
This exposes the override only to the model tool. Please carry the same validated field through the cron CLI, API-server, and web-server create/update paths (and the cron guide), or explicitly narrow the feature scope; users of those existing cron surfaces otherwise cannot create or edit the override.
|
Both halves of this are now on main: |
Summary
/reasoningargument parsing across CLI, gateway, and TUI so--globalworks consistentlyreasoning_effortwith global fallbackTesting
python -m pytest tests/cli/test_reasoning_command.py tests/gateway/test_reasoning_command.py tests/gateway/test_session_reasoning_reset.py tests/test_tui_gateway_server.py tests/tools/test_cronjob_tools.py -q -o addopts=""python -m pytest tests/cron/test_scheduler.py -q -o addopts="" -k "prefers_job_reasoning_effort_over_global_config or falls_back_to_global_reasoning_effort_when_job_unset"Notes
tests/cron/test_scheduler.pystill has 4 pre-existing unrelated failures around silent delivery / empty-response handling on currentmain; I verified they reproduce in a clean worktree atHEAD, so they are not introduced by this PR.