Skip to content

fix(gateway): allow /yolo and /verbose during active agent runs#12955

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-3e4c9628
Apr 20, 2026
Merged

fix(gateway): allow /yolo and /verbose during active agent runs#12955
teknium1 merged 2 commits into
mainfrom
hermes/hermes-3e4c9628

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

/yolo and /verbose now dispatch while an agent is running instead of returning the generic busy message. /yolo can pre-approve a pending approval prompt; /verbose cycles the tool-progress display for the ongoing stream. Both modify session state without needing agent interaction.

/fast and /reasoning stay on the running-agent catch-all — their handlers say "takes effect on next message," so dispatching them mid-turn gains nothing.

Salvaged from #10116 by @elkimek (authorship preserved), scoped down from the original four-command set after reviewing each handler's actual mid-run utility.

Changes

  • gateway/run.py: small allowlist in the running-agent guard for /yolo and /verbose, placed before the _DEDICATED_HANDLERS dispatch and catch-all reject.
  • tests/gateway/test_running_agent_session_toggles.py: 4 new cases — /yolo + /verbose dispatch mid-run; /fast + /reasoning hit the catch-all.

Validation

Before After
/yolo mid-run "⏳ Agent is running — /yolo can't run mid-turn" Toggles session yolo, returns confirmation
/verbose mid-run same busy message Cycles tool-progress mode for the platform
/fast mid-run busy message busy message (unchanged by design)
/reasoning mid-run busy message busy message (unchanged by design)

Targeted tests: 64 passed (4 new + all neighbors in test_command_bypass_active_session.py, test_yolo_command.py, test_verbose_command.py, test_fast_command.py, test_reasoning_command.py, test_unknown_command.py).

Closes #10116.

elkimek and others added 2 commits April 20, 2026 02:44
/yolo and /verbose are safe to dispatch while an agent is running:
/yolo can unblock a pending approval prompt, /verbose cycles the
tool-progress display for the ongoing stream. Both modify session
state without needing agent interaction. Previously they fell through
to the running-agent catch-all (PR #12334) and returned the generic
busy message.

/fast and /reasoning stay on the catch-all — their handlers explicitly
say 'takes effect on next message', so nothing is gained by dispatching
them mid-turn.

Salvaged from #10116 (elkimek), scoped down.
…ch-all

Four parametrized cases that pin down the running-agent guard behavior:
/yolo and /verbose dispatch mid-run; /fast and /reasoning get the
"can't run mid-turn" catch-all. Prevents the allowlist from silently
drifting in either direction.
@teknium1 teknium1 merged commit 9d7aac7 into main Apr 20, 2026
3 of 4 checks passed
@teknium1 teknium1 deleted the hermes/hermes-3e4c9628 branch April 20, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants