In DeepSeek Harness (DSH), pausing a running goal is an irreversible operation: it immediately aborts the current turn and stops all in-flight subtasks (including tool calls, command execution, and sub-agents). To prevent accidental workflow interruption from an unintended click, a confirmation mechanism is required. dsh-goal-pause-guard is a plugin designed for this purpose. When it detects that the user has clicked the pause button, it intercepts the action and shows a confirmation modal.
Core Features¶
The plugin implements its functionality through the following mechanisms:
- Dual detection mechanism: It locates the pause button by recognizing the
aria-label(supporting pt-BR, en, and zh languages) or an SVG icon path (such asIconPauseOutline16). The search scope is limited to inside[data-goal-bar]. - Confirmation modal: After the user clicks pause, the plugin intercepts the action and displays a confirmation dialog.
- Deterministic behavior: The plugin does not rely on timers, network requests, or local storage, ensuring fully predictable behavior.
- Fail-open mechanism: If the button cannot be identified (for example, due to a change in page structure), the click action passes through directly (fail-open), ensuring the plugin never causes a normal pause operation to fail.
- Dynamic re-location: During confirmation, the plugin re-locates the currently active pause button to prevent misclicks caused by page re-rendering.
Installation and Activation¶
The plugin runs as a Bundle plugin in the web configuration profile. After installation, no additional configuration is required; the plugin activates automatically at startup.
- Navigate to the directory containing the plugin.
- Run the installation command:
dsh plugin --profile web add /caminho/para/dsh-goal-pause-guard
- Restart the DSH Web instance to load the plugin:
dsh web
Typical Usage¶
- Trigger pause: On an active Goal Bar, the user clicks the “Pause goal” button.
- Modal appears: The Guard captures the click event and opens a confirmation modal (can be dismissed via Cancel, Esc, or clicking the background).
- Confirm or cancel:
- Confirm: The user clicks Confirm. The plugin re-locates the button and performs a single untrusted click, triggering DSH’s
goals.pauseRPC, which pauses the goal and aborts the current turn. - Cancel: The user clicks Cancel, presses Esc, or clicks the background. The modal closes and the goal continues running with no side effects.
- Confirm: The user clicks Confirm. The plugin re-locates the button and performs a single untrusted click, triggering DSH’s
Notes and Compatibility¶
- Compatible versions: The plugin has been verified for compatibility with DSH 0.1.5-alpha.2.
- Stateless design: The plugin contains no timers, network requests, or storage logic, consistent with the definition of a lightweight tool.
- License: Released under the MIT License.
- Directory link: For more details and source code, refer to the plugin directory page or the GitHub repository.