Introduction

The context of a DSH agent undergoes compression, and early determined information may be lost when switching sessions. In existing approaches, todo lists typically focus on “what to do next”; however, there is information that needs to be preserved stably: what the current goal is, which constraints must not be deviated from, and which decisions have already been made.

dsh-plugin-focus is a DSH plugin that provides a focus tool and a persistent focus board to the agent. The focus board is located within the session workspace and is used to record goals, constraints, and decisions, re-injecting them into the model context at the start of each round or when content changes.

What is this

One-sentence positioning: dsh-plugin-focus is a focus board plugin for DeepSeek Harness agents, fixing goals, constraints, and decisions using a model-maintainable note.

Verified Information:

  • Name: dsh-plugin-focus
  • License: MIT
  • GitHub Repository: https://github.com/863683348/dsh-plugin-focus

The core problem it solves is: when an agent executes a long task, it needs to save “why it is doing it, what cannot be deviated from, and what has been decided” in a location that remains readable after context compression and session switching.

Core Features

Below is an introduction to the verified capabilities.

focus Tool

The plugin provides a focus tool that supports four actions:

  • set
  • get
  • append
  • clear

These actions are used to write, read, append, and clear the focus board.

Prompt Guidance Section

The plugin provides a focus:instructions prompt guidance section, used to supplement the model with guidance information on how to use the focus board.

Automatic Context Injection

The focus board is re-injected into the model context in the following scenarios:

  1. At the start of every round;
  2. When the focus content changes.

No injection occurs when the board is empty, and the injected content is limited by maxChars.

Archiving on clear

When executing clear, the old focus board is archived to:

.dsh/focus.md.bak

This means that after clearing the current board, the old content is still retained in the archive file.

focusBoard Session Projection

The plugin provides a focusBoard session projection for UI use.

Read-only Web Panel

The plugin provides an experimental read-only Web panel. Verified information states: the panel has not yet been verified against running web instances.

Installation and Enablement

Install using the DSH plugin management command:

dsh plugin --profile <profile> add dsh-plugin-focus

Restart DSH after installation.

Typical Usage

focus is a model-side tool. Common usage is as follows.

focus set

Used to append an entry fixing the current focus or a constraint.

Applicable content:

  • Current goal;
  • Hard constraints;
  • Context that must remain unchanged.

focus append

Used to append log entries.

Applicable content:

  • Decisions;
  • Discoveries;
  • Reversals;
  • New important context during execution.

focus get

Used to read the entire board.

When reading, the latest items are prioritized, and it is constrained by the maxChars rendering limit.

focus clear

Used to clear the board.

After execution, the old board is archived.

Configuration

Plugin configuration items can be written in the config of the composition row. Verified configuration items include:

file
archiveFile
archive
maxEntries
maxChars
autoInject
personaSection
sectionOrder

Key points among them are:

  • file: board path, needs to be inside the session workspace;
  • archiveFile: archive path when clearing;
  • archive: controls whether to archive before clearing;
  • maxChars: limits rendering or injection length;
  • autoInject: controls whether to automatically inject the focus board;
  • personaSection: controls whether to register the focus:instructions prompt guidance section;
  • sectionOrder: used for prompt section order.

File paths cannot escape the session workspace. Configuration paths falling outside the session workspace will fail.

Suitable Scenarios and Notes

Suitable for the following usage:

  1. Long-running DSH agent within the same session workspace;
  2. Agent tasks need to retain goals, constraints, and key decisions;
  3. Hope the focus board remains readable by the model after context compression;
  4. Need to continue reading existing focus entries in new sessions within the same workspace.

Notes to pay attention to:

  1. The focus board is managed by the workspace rather than by the session;
  2. When an existing .dsh/focus.md exists, new sessions will read existing entries;
  3. Auto injection does not inject when the board is empty, and is limited by maxChars;
  4. The read-only Web panel is still experimental, not yet verified against running web instances;
  5. All file access goes through the host ctx.fs service, and paths need to be containment-checked to the agent’s session workspace, cannot escape;
  6. The plugin runs with the current dsh process permissions; check the source code and license before installing.

Conclusion

dsh-plugin-focus provides a small persistent memory board for the DSH agent: use focus set to fix goals and constraints, use focus append to record decisions, discoveries, and reversals, use focus get to read the current board, and use focus clear to clear and archive. Its core value lies in placing “why it is doing it, what cannot be deviated from, and what has been decided” in the session workspace and automatically bringing it back into the model context.

GitHub Repository:

https://github.com/863683348/dsh-plugin-focus

Directory page address not provided.