Files
deepseek-harness/packages/subprocess
pku-xht ed6f0c8774 Merge commit 'ecbb7896d3deeeac0bca71cef6b0d17e5b23896b' into codex/product-providers-pr2-claude-code
# Conflicts:
#	.agents/notes/proposed/feature/2026-08-04-claude-code-and-codex-subagent-backends.i18n.yaml
#	.agents/notes/proposed/feature/2026-08-04-claude-code-and-codex-subagent-backends.md
#	.agents/notes/proposed/feature/2026-08-04-claude-code-and-codex-subagent-backends.zh.md
#	docs/capability-seams.md
#	docs/module-graph.md
#	packages/subagent/README.i18n.yaml
#	packages/subagent/README.md
#	packages/subagent/README.zh.md
#	scripts/gen-doc-graphs.ts
2026-08-05 06:40:45 +08:00
..

subprocess/ — subprocess capability family

English | 中文

The shared home for spawning managed child-process trees: fully-specified spawn specs with Node-shaped per-stream stdio dispositions (raw pipes, inherit, bounded tail-keep collection with spill files), the one credential scrub every harness spawner uses, offset-based incremental reads, tree-scoped signalling with SIGTERM→grace→SIGKILL escalation, and whole-tree exit observation. Command defaulting, shell semantics, deadlines, cooperative shutdown sequencing, protocol framing, and presentation stay with consumers — the bash executors, the LSP host, and the ACP subagent backend. See the subprocess seam Agent Note.

Package ctx key Role
subprocess (@deepseek-ai/dsh-subprocess) ctx.subprocess The seam: abstract SubprocessService.spawn(spec), the fully-explicit SubprocessSpawnSpec with per-stream stdio dispositions, SubprocessHandle (streams, offset-based readers, terminate/waitForExit), and the shared scrub + DSH_*/CollectedOutput vocabulary
subprocess-local (@deepseek-ai/dsh-subprocess-local) The local implementation: detached process trees, per-disposition stream wiring, tail-keep truncation with bounded private spill files, the DSH_* merge order, tree signalling with escalation, and whole-tree exit observation

The service owns process lifetime across consumer reloads; consumers own what a process means (a bash command, a future non-shell runner) and every default that shapes one.