Skip to content

fix(cli): dispatch /background inline while agent is running (#75221) - #75303

Closed
cipheraxat wants to merge 1 commit into
NousResearch:mainfrom
cipheraxat:fix/75221-background-inline-dispatch
Closed

fix(cli): dispatch /background inline while agent is running (#75221)#75303
cipheraxat wants to merge 1 commit into
NousResearch:mainfrom
cipheraxat:fix/75221-background-inline-dispatch

Conversation

@cipheraxat

Copy link
Copy Markdown

Summary

  • Classic CLI Enter handling now dispatches /background (/bg, /btw) inline while a foreground turn is running, mirroring the existing /steer path from fix(cli): dispatch /steer inline while agent is running #13354.
  • Prevents the command from sitting on _pending_input until chat() returns, which defeated mid-run background work.
  • Adds focused regression coverage in tests/cli/test_cli_background_busy_path.py.

Fixes #75221.

Test plan

  • scripts/run_tests.sh tests/cli/test_cli_background_busy_path.py tests/cli/test_cli_steer_busy_path.py -q (17 passed)
  • Manual smoke (optional): start hermes, submit a long prompt, while running enter /bg say hi — expect immediate “Background task #N started” before the foreground turn finishes
  • Confirm ordinary busy-input text still follows busy_input_mode (queue/steer/interrupt) and is not affected
  • Confirm idle /background still works via normal process_command

Classic CLI queued /background (/bg, /btw) on _pending_input during an
active turn, so the independent task only started after chat() returned.
Mirror the /steer Enter-path early dispatch so the mid-run-safe handler
runs immediately. Fixes NousResearch#75221.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists labels Jul 31, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #75267: both add the same busy-agent /background alias detector and inline CLI dispatch for #75221. #75267 is the earlier open implementation.

@cipheraxat

cipheraxat commented Jul 31, 2026

Copy link
Copy Markdown
Author

Closing as duplicate of #75267 , that PR was opened earlier for the same #75221 fix and already has CI + review progress. Thanks for the triage.

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 duplicate This issue or pull request already exists 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.

[Bug]: /background (/bg, /btw) is queued until the active CLI turn finishes

2 participants