Local coding agents often rely on loose STATUS.md maintenance conventions when handling long-horizon tasks. This approach can easily lead to state discrepancies, chaotic file structures, and wasted tokens due to frequent file reads. The dsh-local-long-horizon plugin transforms this process into a host-managed, structured Vault and provides validated Agent tools to ensure task state is visible and maintainable within the DeepSeek Harness Web UI.
Core Features¶
The plugin provides the following core capabilities:
- Host-Managed State: State is stored on the host side, rather than relying on the Agent to maintain files itself.
- Structured Vault: Data is stored in a JSON-formatted Vault, with
STATUS.mdserving as a one-way projection. - Tool Validation: Provides a set of validated Agent tools for reading and writing state.
- Injection File: Provides a minimal injection file for resuming context.
- UI Integration: Provides a “Long horizon” panel in the right column and chip displays in the Composer dock.
- Agent Toolset: Includes tools for initialization, fetching, setting next steps, setting in-flight status, completion, blocking/unblocking, and toggle control.
Installation & Activation¶
Installing the plugin requires using the DeepSeek Harness Web Profile.
- Execute the following command in the terminal to install the plugin:
dsh plugin --profile web add dsh-local-long-horizon
- After installation, restart the
dsh webservice to load the plugin. Once restarted, refresh the browser page to see the new features.
Typical Usage¶
Once enabled, the Agent can manage task state via tool calls.
- Initialize: Use
status_initto enable long-horizon tracking. - Set Next: Use
status_set_nextto replace items in the Next list (limited to 0-3 items). - Set In-flight: Use
status_set_inflightto mark the task currently being executed; a non-emptysummaryis required. - Mark Done: Use
status_mark_doneto record completed tasks; including averifyfield is recommended. - Maintain
AGENTS.md: Keep anAGENTS.mdfile in the project root as “glue”. DSH injects this into the Agent instructions to guide the Agent to read the injection file and use the status tools.
Agent Tool List¶
| Tool Name | Function |
|---|---|
status_init |
Create or refresh the Vault to start long-horizon tracking |
status_get |
Retrieve the complete structured record |
status_set_next |
Replace the Next list (max 3 items) |
status_set_inflight |
Set the current in-flight task |
status_clear_inflight |
Clear the in-flight task |
status_set_phase |
Set a short-horizon phase label |
status_mark_done |
Mark a task as done (can include verify and rotateNext) |
status_block / status_unblock |
Mark or unmark blocked status |
status_set_enabled |
Enable or disable long-horizon tracking |
status_ping |
Probe Host health status |
Notes & Architecture¶
System Requirements¶
- Node.js: Node.js >= 20 must be installed.
- DSH Version: Verified compatible with DeepSeek Harness
0.1.7-rc.2.
Limitations & Constraints¶
- Next Limit: The Next list can hold a maximum of 3 items; a fourth will be rejected.
- In-flight Requirement: When setting an in-flight task, the
summaryfield cannot be empty. - Done Record: When marking as done, the
verifyfield is recommended; its absence will only trigger a warning. - Toggle Control: When tracking is disabled, all state-modifying tools will refuse execution, and the injection file freezes to a single line
DISABLED. - Sync Notice: Sync notices (such as git branch changes) are displayed only in the panel, not on the Dock chip.
Data Flow¶
- Vault: The data source is
~/.dsh/storages/dsh-local-long-horizon/<taskId>.json. - Injection File: The bound state file actually read by the agent is
<cwd>/.dsh/task-status-inject.md. - Markdown:
<cwd>/STATUS.mdis generated based on Vault content and overwritten on every change. - No File Dependency: The plugin has no read dependencies on the host filesystem; tools are registered via the
ctx.toolsservice provided by DSH.
Summary¶
dsh-local-long-horizon solves the state tracking problem in long-horizon tasks by transforming state management from an Agent’s “soft convention” into a host’s “hard structure”. Combined with the DeepSeek Harness Web UI, it provides developers with a visualized task board and a reliable state write-back mechanism.