Skip to content

Interruptibility Design Principle

The Interruptibility Design Principle is a core design philosophy within the Hermes Agent architecture that prioritizes user control and system responsiveness.^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md]

It dictates that any operation—whether an internal API call or an external tool execution—must be designed to be immediately cancellable or redirectable by the user.^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md] This prevents the agent from entering a "locked-in" state where it continues executing a long, irrelevant task despite the user's desire to stop or change course.

Core Mechanisms

To achieve true interruptibility, the system implements several specific interaction patterns^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md]:

  • Graceful Cancellation: All long-running operations must support termination signals. This allows the user to halt execution cleanly without causing system instability or leaving resources in an undefined state^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].
  • CLI Interruption: In the command-line interface, standard interruption signals (e.g., Ctrl+C) are captured to stop the current work immediately^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].
  • Message-based Redirection: In the Gateway interface, sending a new message or a specific command (such as /stop) acts as an interrupt signal^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md]. This allows the user to shift the agent's focus simply by typing, rather than requiring a separate control flow mechanism.

Design Philosophy

The principle addresses a common failure mode in autonomous systems: the inability to correct course once an action has started^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

  • User Agency: By enforcing interruptibility, the system ensures that the human operator retains ultimate authority over the agent's execution loop^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].
  • Error Mitigation: If an agent begins to execute a tool based on a misunderstanding or a hallucination, interruptibility acts as a critical safety rail, preventing the waste of computation and time on erroneous tasks^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

Application Contexts

Interruptibility is a defining characteristic of interactive systems and stands in contrast to batch-processing or unidirectional execution models^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

  • Suitable For: Designing systems that require real-time feedback, iterative refinement, or those that operate in volatile environments where user intent may change rapidly^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].
  • Anti-Pattern: Pure "fire-and-forget" scripts or offline batch jobs where user intervention during execution is impossible or undesired by design^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].
  • [[Loose Coupling via Registry]]: The modular architecture that supports individual tools being managed or halted.
  • [[Platform-Agnostic Core]]: The engine that routes interrupt signals from various interfaces (CLI, Gateway) to the core execution logic.
  • [[Observable Execution]]: The design principle ensuring that tool calls are visible, which is a prerequisite for users to know when to interrupt.

Sources

  • 001-TODO__Hermes_Agent_·_设计哲学与思维框架.md