跪拜 Guibai
← All articles
LLM · DeepSeek · AI Programming

dsh-orchestrator: Move Your AI from Solo Worker to Team Lead

By 土豆1250 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Western developers running real DSH projects can stop being a human scheduler: this plugin transfers task state, dependencies, and artifact tracking from memory to a database, letting multiple independent AI sessions work in parallel without context clashes. The payoff is fewer context-loss mistakes and more concurrent work, not faster single inference.

Summary

dsh-orchestrator (npm @wjj865-code/dsh-orchestrator, v0.11.0, MIT) is a plugin for DeepSeek Harness that replaces a single overloaded AI conversation with a coordinator session and multiple sub-session workers. The coordinator has no file or shell access; it only creates tasks, checks status, and receives reports. Each sub-session runs in its own directory with full tool access, and a SQLite ledger at $DSH_HOME/state/orchestrator/tasks.sqlite records state, dependencies, groupings, write scopes, messages, artifacts, and goal snapshots. This structure solves three walls a single session hits: context overload, serial execution, and memory loss across sessions.

Tasks are created via task_create with a goal, acceptance criteria, constraints, and the user's verbatim request. Dependencies are declared with dependsOn, so tasks wait in waiting_dep without consuming a concurrency slot, then auto-promote when prerequisites finish. Write scopes are advisory conflict hints, not locks. The coordinator has 10 tools; sub-sessions have 2: task_report for progress/blocked/needs_auth and task_detail for reading their own task snapshot. The brief sent to a sub-session is only two lines: task ID and a pointer to call task_detail, decoupling prompt length from task complexity.

The plugin includes robustness features: an inbox for decisions, settlement to move stuck tasks from running to cancelled/failed/orphaned, startup reconciliation, and a watchdog that only alerts. keepAlive lets a sub-session keep running across round boundaries, but it defaults off and has round limits. The article also covers common pitfalls: writeScopes is not a lock, dependsOn is immutable after creation, and you must fully restart DSH after installing.

Takeaways
— dsh-orchestrator is a DeepSeek Harness plugin at npm @wjj865-code/dsh-orchestrator, version 0.11.0, MIT.
— It creates a coordinator session plus multiple sub-session workers; the coordinator has no file or shell access.
— A SQLite ledger at $DSH_HOME/state/orchestrator/tasks.sqlite records task state, dependencies, groups, write scopes, messages, and artifacts.
— Coordinator tools: task_create, task_list, task_status, task_message, task_stop, task_retry, task_inbox, history_search, project_context, memory_note (10 tools).
— Sub-session tools: task_report (progress/done/blocked/needs_auth) and task_detail (read own task snapshot).
— Tasks are created with goal, acceptance, constraints, and user_verbatim; acceptance criteria matter more than vague quality statements.
— dependsOn makes a task wait in waiting_dep without occupying a concurrency slot, auto-promotes when prerequisites complete, and propagates failure.
— writeScopes is a conflict hint, not a file lock; use dependsOn for serialization.
— The brief for a sub-session is only two lines: task ID and instruction to call task_detail, decoupling prompt length from task complexity.
— Settlement (S1) moves interrupted tasks to cancelled, exceptions to failed, and silent tasks to orphaned; startup reconciliation (S2) marks running tasks with no live sub-session as orphaned.
— A watchdog alerts every 5 minutes if a running task has no heartbeat for 15 minutes; it never kills or restarts tasks.
— keepAlive lets a sub-session continue across round boundaries, defaults off, has max rounds (default 8), and only applies to running tasks with incomplete goals.
— Memory injection defaults to 3 facts per new task; done summaries go to the log layer, not memory, and only distilled atomic facts (lesson/decision/preference/note) are injected.
— The article itself was written by a sub-session dispatched via task_create with a goal, acceptance criteria, and background material paths.
Conclusions

The design deliberately weakens the coordinator to prevent accidental code changes, shifting all file and shell access to sub-sessions; this is a sensible safety boundary for autonomous AI agents.

The evolution from 0.4.0 to 0.11.0 shows a clear pattern: each release reduces prompt bloat and hands more context to sub-sessions via on-demand reads, directly addressing the cost of long prompts.

The focus on silent failures (orphaned tasks) reflects a real operational pain: in autonomous agent systems, absence of error is not success; reconciliation and settlement are essential.

The keepAlive feature is deliberately conservative, defaulting off with round limits, acknowledging that uncontrolled autonomy can burn money; cost control is treated as a separate responsibility.

The article's own production via a sub-session demonstrates dogfooding: the plugin orchestrated the writing of its own promotion article, which is a convincing proof point.

Concepts & terms
Coordinator (main session)
The fixed main session in dsh-orchestrator that creates and dispatches tasks, reviews reports, and declares artifacts. It deliberately has no file or shell access, so it cannot modify code; it only coordinates.
dependsOn
A parameter in task_create that declares a dependency on another task. A task with unmet dependencies stays in 'waiting_dep' without consuming a concurrency slot, and auto-promotes when prerequisites finish; failure propagates along the chain.
writeScopes
Advisory paths a sub-session is allowed to write. It's a conflict hint, not a file lock; two tasks targeting the same scope won't block each other. Use dependsOn for serialization.
keepAlive
An opt-in flag (default off) that lets a sub-session keep running across round boundaries instead of idling and settling. It has a round budget (default 8) and only applies to running tasks with an incomplete platform goal; it is not a cost control mechanism.
From the discussion
Featured comments
shushenghong

The 'memory wall' is even more obvious in a team: the ledger sits on your own machine, so a colleague's pitfalls from yesterday's session are still unknown to your session. We later put everyone's task records and project rules on the same machine, so before an agent starts, it can look up similar tasks others have done, and when someone else takes over, they don't have to re-explain everything from scratch.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗