Skip to content

feat(cli): make Ctrl+C priority configurable (interrupt_agent vs clear_input) - #11355

Closed
nicoechaniz wants to merge 1 commit into
NousResearch:mainfrom
nicoechaniz:feat/ctrl-c-configurable-priority
Closed

feat(cli): make Ctrl+C priority configurable (interrupt_agent vs clear_input)#11355
nicoechaniz wants to merge 1 commit into
NousResearch:mainfrom
nicoechaniz:feat/ctrl-c-configurable-priority

Conversation

@nicoechaniz

Copy link
Copy Markdown
Contributor

Summary

Adds a display.ctrl_c_priority config option so users can choose whether Ctrl+C in the CLI clears the input buffer first (like a shell) or immediately interrupts the agent.

Closes #11352

Changes

  • hermes_cli/config.py: adds "ctrl_c_priority": "interrupt_agent" to DEFAULT_CONFIG.
  • cli.py: when ctrl_c_priority is "clear_input", Ctrl+C resets the input buffer and attached images; only interrupts the agent if the buffer is already empty.

Usage

display:
  ctrl_c_priority: "clear_input"  # default: "interrupt_agent"

Testing

  • Local pytest passes
  • Rebased on latest origin/main

Backwards compatibility

Default is "interrupt_agent", preserving existing behavior.

@nicoechaniz
nicoechaniz force-pushed the feat/ctrl-c-configurable-priority branch 2 times, most recently from 9fa344f to 8d015c9 Compare April 20, 2026 05:28
@nicoechaniz

Copy link
Copy Markdown
Contributor Author

Hi @teknium1 — this makes Ctrl+C behavior configurable (interrupt agent vs clear input). Rebased on latest main and ready for review. Thanks!

@nicoechaniz
nicoechaniz force-pushed the feat/ctrl-c-configurable-priority branch from 8d015c9 to 0ebb878 Compare April 22, 2026 02:24
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles labels Apr 22, 2026
@nicoechaniz
nicoechaniz force-pushed the feat/ctrl-c-configurable-priority branch from 0ebb878 to f97bbfa Compare April 22, 2026 07:21
@nicoechaniz
nicoechaniz deleted the feat/ctrl-c-configurable-priority branch April 28, 2026 03:24
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/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Configurable Ctrl+C priority in CLI (clear input vs interrupt agent)

2 participants