deepseek-harness/docs
kingwl 669771097d subagent: inherit parent sandbox/approval overrides in in-process children
Per-session policy overrides (sandbox/mode, approval/policy) never crossed
the delegation boundary: a spawn child of a read-only-switched parent ran
under the wider deployment default, and a fork child missed any switch made
after its seed boundary — delegation was a bypass channel for a user's
tightening.

The in-process driver now snapshots the delegating parent's override chain
and stamps it onto the child through the canonical write paths
(SandboxPolicyService.inheritOverride / ApprovalService.inheritOverride),
anchored inside the child's first turn via a one-shot agent/prompt-submit
listener: turn-enclosed (durable), ahead of the first request (an inherited
'never' reaches the child's first system prompt), and positioned after any
stale fork-seed switch so the ordinary last-event-wins fold resolves it.
Only overrides are copied — an unswitched parent stamps nothing and the
child follows the live deployment default; both services are consumed
opportunistically, so compositions without them delegate unchanged. Nesting
composes by construction (each stamp folds the already-stamped parent log).

Evidence: inheritance.spec.ts drives scripted-model children into the real
dsh-fs-sandbox fence through the real write tool (disk-state + denial-marker
assertions; spawn, stale-seed fork, grandchild, escalation fail-closed, and
no-stamp guards), inheritOverride contract tests in both service suites, and
the recorded subagent-sandbox-inheritance ACP snapshot (read-only preset →
delegate → child denied, replayed keylessly).

See .agents/notes/implemented/feature/2026-07-25-subagent-policy-inheritance.md.
2026-07-25 04:06:19 +08:00
..
cookbook refactor(plan): remove generic mode abstraction 2026-07-22 16:57:23 +08:00
cordis-catalog subagent: inherit parent sandbox/approval overrides in in-process children 2026-07-25 04:06:19 +08:00
core-data-structures Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 23:17:02 +08:00
i18n chore: keep local git hooks fast 2026-07-22 16:37:20 +08:00
postmortem Remove the stdio agent 2026-07-20 19:26:04 +08:00
user Remove the Echo agent 2026-07-20 20:16:41 +08:00
agent-lifecycle.md feat(session): add cross-session references 2026-07-21 16:46:48 +08:00
AGENTS.md docs: restore generated Cordis core API 2026-07-20 16:33:44 +08:00
architecture.i18n.yaml Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 23:17:02 +08:00
architecture.md Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 23:17:02 +08:00
architecture.zh.md Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 23:17:02 +08:00
capability-seams.md Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 23:17:02 +08:00
config-catalog.md Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 23:17:02 +08:00
cordis-primer.md fix(snapshot): register filesystem tools through explicit overlay 2026-07-14 21:25:58 +08:00
defensive-patterns.md feat(agent-loop): give each send its own turn 2026-07-17 17:14:52 +08:00
development.i18n.yaml refactor: name the all-gates mode check-all 2026-07-22 18:27:31 +08:00
development.md refactor: name the all-gates mode check-all 2026-07-22 18:27:31 +08:00
development.zh.md refactor: name the all-gates mode check-all 2026-07-22 18:27:31 +08:00
event-producer-consumer.md subagent: inherit parent sandbox/approval overrides in in-process children 2026-07-25 04:06:19 +08:00
glossary.md Merge branch 'codex/goal-commands' into codex/ralph-tool 2026-07-20 21:05:05 +08:00
graph-atlas.md refactor(examples): fold plan mode into ACP demo 2026-07-21 00:40:15 +08:00
module-graph.md Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 23:17:02 +08:00
persistence-catalog.md Merge remote-tracking branch 'origin/master' into worktree/pr468-retarget-latest-master 2026-07-22 21:06:50 +08:00
testing.md Condense snapshot testing policy 2026-07-20 23:24:43 +08:00
tool-catalog.md Merge refreshed rfc/pty into feature/persistent-pty-sessions 2026-07-22 21:12:16 +08:00
tool-execution-pipeline.md Merge current master into debug-pangwenjie 2026-07-18 13:39:12 +08:00
web-styling.md feat(gui): step1 skeleton — dsc web serves built web UI over booted harness host 2026-07-22 16:24:44 +08:00