Introduction¶
In a local coding environment, starting long-lived processes via bash often encounters the “zombie process” problem: the agent forgets the process PID, the port remains occupied, and the next startup encounters an EADDRINUSE error. This often leads the agent to misdiagnose it as a code logic error, when in fact it is just a port conflict.
Overview¶
dsh-agent-processes is a plugin for the DeepSeek Harness Web UI, maintained by janpauldahlke, designed to provide full lifecycle management for host-owned processes and ports. It offers first-class control capabilities for agents, including start/stop/list/logs/wait-for-ready, and provides a persistent storage view and interactive panel via the UI.
Core Features¶
This plugin provides the following core capabilities:
- Process Control: Supports
process_start,process_stop,process_list,process_logs,process_wait_ready, andprocess_ping. - Port Reclamation: When starting a process with a port, it automatically reclaims tracked port occupiers; for untracked holders, the plugin refuses the connection rather than killing the process directly.
- UI Panels:
- Processes Rightbar: Follows the chat workspace, displaying status dot, ID/Port, PID/Runtime, command, working directory, log preview, and providing Kill/Restart/Clear buttons.
- Dock Chip: When the right bar is closed and there are running processes in the workspace, it displays a chip hint (e.g.,
Processes · :3000); clicking it opens the panel.
Installation and Enablement¶
Installing this plugin requires the DeepSeek Harness Web configuration profile (dsh web) and Node.js environment version ≥ 20.
dsh plugin --profile web add dsh-agent-processes
After installation, restart dsh web or rely on hot updates to load the plugin, and perform a hard refresh in the browser to load the client code.
Typical Usage¶
In agent workflows, use the tools provided by the plugin instead of raw Shell commands and sleep to avoid port conflicts and process loss.
- Start Process: Use
process_startto start a process. If the process listens on a port, theportmust be included in the parameters. - Wait for Ready: Use
process_wait_readyinstead ofsleep. It polls until the port is connectable (or times out), ensuring the process is ready to receive traffic. - Check Status: Before assuming the port is idle, use
process_listto check the currently tracked process records. - Stop Process: Use
process_stopto stop the process.
Use Cases and Notes¶
- Use Cases: Local development servers, file monitoring services, long-running Node.js services, and other processes that need to remain running.
- Security Restrictions: The plugin can only terminate PIDs it tracks; for untracked external processes occupying a port, the plugin will refuse the connection (
refused) instead of forcibly killing the process. Users need to manually clean up these external processes or switch to another port. - Known Limitations: The plugin does not include log rotation; logs are in append mode; crash detection relies on liveness probes rather than signal listening; there is no session-based isolation, and the repository is specific to the Web configuration profile.
Conclusion¶
dsh-agent-processes solves the pain points of process lifecycle management in local coding environments, ensuring port availability and process controllability. By providing a standardized tool interface and an intuitive UI, it makes agents more stable when handling long-running tasks.
- GitHub Repository: github.com/janpauldahlke/dsh-agent-processes
- Plugin Directory: www.skillhub.cn/plugins/janpauldahlke/dsh-agent-processes