Skip to content

fix: support /reasoning --global and cron reasoning overrides - #14617

Closed
Alex-giao wants to merge 1 commit into
NousResearch:mainfrom
Alex-giao:fix/reasoning-global-and-cron-reasoning
Closed

fix: support /reasoning --global and cron reasoning overrides#14617
Alex-giao wants to merge 1 commit into
NousResearch:mainfrom
Alex-giao:fix/reasoning-global-and-cron-reasoning

Conversation

@Alex-giao

Copy link
Copy Markdown

Summary

  • share /reasoning argument parsing across CLI, gateway, and TUI so --global works consistently
  • keep session-scoped reasoning overrides separate from persisted global config, including reset/restart paths
  • let cron jobs store and honor per-job reasoning_effort with global fallback

Testing

  • 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.py still has 4 pre-existing unrelated failures around silent delivery / empty-response handling on current main; I verified they reproduce in a clean worktree at HEAD, so they are not introduced by this PR.

- 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
@alt-glitch alt-glitch added type/feature New feature or request P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/cron Cron scheduler and job management labels Apr 23, 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 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:2469 and gateway/slash_commands.py:2634, so the cli.py and gateway/run.py hunks 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/clamp branches while adding flag parsing.

Automated hermes-sweeper review.

Comment thread tools/cronjob_tools.py
@@ -459,6 +464,10 @@ def cronjob(
"type": "string",

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

@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit labels Jul 12, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Both halves of this are now on main: /reasoning --global session/global scoping exists in gateway/run.py (_parse_reasoning_command_args), and per-job cron reasoning overrides landed via #91244 (43c6dac; first-submitter credit for the cron feature to @PavelTajdus in #30929 — your April PR predates even that and is credited here as the earliest exploration of cron reasoning overrides). Closing as implemented on main — thanks @Alex-giao.

@teknium1 teknium1 closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants