Introduction¶
When integrating external CLI inference capabilities into DSH, a common requirement is to delegate tasks to independent sub-agents while preserving session continuity, parallel execution, and tool step feedback. The following introduces the plugin in the repository flg1217/dsh-subagent-codebuddy: it registers the CodeBuddy Code CLI as a provider of independent inference sub-agents for DSH and exposes the subagent_codebuddy delegation tool.
What is this¶
flg1217/dsh-subagent-codebuddy is a DSH plugin under the MIT license, maintained by flg1217.
Its positioning is to integrate the CodeBuddy Code CLI into DSH, enabling DSH to create in-process sub-agents, delegate tasks in parallel, continue conversations, and receive text and tool steps.
Core Features¶
- Register
codebuddyprovider routing and thesubagent_codebuddydelegation tool. - In-process sub-agent session management, parallel creation, and continuation via
send_message. - Context is managed by DSH; every call serializes the sub-agent’s full history into the prompt.
- Text and tool steps are bidirectionally translated between the DSH session and the CodeBuddy process; tool steps include
tool/callandtool/result. - Image inputs are saved to temporary files on disk, with local paths provided in the prompt.
- Long context protection: automatically writes to a temporary task file when the prompt exceeds the threshold (26K characters).
- Dynamic model selection:
subagent_codebuddyaccepts amodelparameter;list_codebuddy_modelsis used to query model IDs.
Installation and Enablement¶
First, confirm the system requirements:
dsh >= 0.1.0-rc.6
CodeBuddy CLI is installed and logged in
Compatibility verification date is 2026-08-21, verified on dsh rc.8. The subprocess will inherit the CodeBuddy CLI login state.
The installation command is as follows, using the web profile:
dsh plugin --profile web add https://github.com/flg1217/dsh-subagent-codebuddy
After installation, subagent_codebuddy and list_codebuddy_models will appear in the tools list.
Uninstall command:
dsh plugin --profile web remove @flg1217/dsh-subagent-codebuddy
If there are any remnants, manual cleanup of the profile configuration and corresponding dependencies in package.json is required.
Typical Usage¶
- Delegate design tasks such as front-end/UI to
subagent_codebuddy, allowing themodelparameter to dynamically specify the model. - Split independent tasks for parallel execution by multiple CodeBuddy sub-agents, with results not interfering with each other.
- Before delegating, call
list_codebuddy_modelsto query currently supported model IDs, then pass the accurate ID as themodelparameter. - The permission mode defaults to
bypassPermissions, automatically allowing sub-agent tool calls; for a more conservative approach, you can change it toacceptEditsorplan.
Applicable Scenarios and Notes¶
Suitable for users who are already using the web profile in DSH and wish to integrate the CodeBuddy Code CLI as a provider of independent sub-agents. The plugin runs within the DSH plugin mechanism and inherits DSH’s current process permissions. It is recommended to check the source code and license before installation.
Please note: The default permission mode is relatively permissive; bypassPermissions will automatically allow sub-agent tool calls. If used in higher-privilege sensitive environments, it should be changed to acceptEdits or plan.
Names are not fully consistent in this documentation: the repository name is flg1217/dsh-subagent-codebuddy, the README title is dsh-subagent-codebuddy, and the package.json package name is @flg1217/dsh-subagent-codebuddy. This article refers to the plugin using the repository address.
Conclusion¶
The value of this plugin lies in integrating the CodeBuddy Code CLI into DSH as a delegatable, parallelizable, and conversable sub-agent, while keeping context management and tool step feedback within the DSH session.
GitHub repository address:
https://github.com/flg1217/dsh-subagent-codebuddy
The directory page link was not provided in the verified materials for this update.