Most coding agents dump every available tool’s JSON Schema into the prompt—including tools the model will never actually use. dsh-lazy-tools provides CodeBuddy-style deferred tool loading for DeepSeek Harness. It’s a tool_search + defer_execute_tool overlay that keeps tool schemas out of the model’s context until they’re actually needed, reducing token consumption and context window usage while maintaining tool discoverability.
Features¶
- On-demand discovery: The model discovers tools on demand via
tool_search; once activated, they can be called directly. - Lazy activation: Tools don’t enter the context by default; they’re only activated when requested.
- Activation by name: Activate known tools directly by exact tool name via
defer_execute_tool. - Non-invasive: Doesn’t modify the tool registry—only subtracts from the tool list visible to the model, naturally coexisting with any other strategies.
- Flexible configuration: Supports CodeBuddy-style
Defer(...)/NoDefer(...)patterns with wildcards. - Self-preservation:
tool_search,defer_execute_tool, andrun_codeare never deferred. - Per-project auto-tuning: The plugin tracks real usage per project and sets the most commonly used tools as always-resident.
- Global + project-level two-tier configuration: Supports global default configuration and per-project overrides.
Installation¶
Install the plugin via command line:
dsh plugin --profile <profile> add github:studyzy/dsh-lazy-tools
After installation, DeepSeek Harness needs to be restarted. The bundle layer is only loaded at startup; the current process does not hot-reload.
Configuration & Usage¶
The plugin defaults to an “install-and-go, zero-configuration” mode: it defers the long-tail tools by default while keeping a set of always-resident coding cores (read, write, edit, bash, glob, grep, web_search, web_fetch, ask_user_question, skill).
When auto-tuning is enabled, the plugin tracks real usage per project, sets the most commonly used tools in each project as always-resident, and defers all others. The model discovers them on demand via tool_search; once activated, they can be called directly.
If you need custom rules, you can configure them in the profile’s cordis.patch.yml. To completely turn off deferred loading, simply write defer: [] in the configuration.
Notes¶
- This plugin does not depend on provider-native deferred tool protocols (such as Anthropic
tool_referenceor OpenAI’s deferred-tool input items). - The plugin does not own or implement any tools, nor does it proxy execution—it only handles activation.
- It works with any model and any provider (DeepSeek, OpenAI, Anthropic, Gemini, etc.).