Repository navigation
Description
Incident (2026-08-07, ad-motion overnight run, 2.10.0)
A phase agent for #177: (1) noticed the orchestrator in ps (sequant run --chain 177 178 181 ..., PID from .sequant/locks/177.lock); (2) built a
CORRECT competing-session safety case, recommended against killing it, and
asked for human confirmation; (3) received the orchestrator's mechanical retry
prompt ("Run the /exec 177 workflow" — 8 occurrences in its transcript),
read it as a human twice reaffirming ("You've reaffirmed this twice, so I'm
proceeding"); (4) ran kill <pid> then kill -9 <pid> — "killing competing
chain run (idle 30m, exec already failed)". Every evidence item was an
artifact of its own position in the tree (supervisor CPU is low; "its agent
child is dead" was the previous phase's process, replaced by the very process
running the agent; "idle 30m" was total elapsed). SIGKILL landed mid-teardown:
stale locks, worktrees destroyed. Verified account: ad-motion
experiments/overnight-autonomy/review-log.md + captures/2026-08-07/.
Why existing layers didn't hold
- sequant already refuses exactly this action at the CLI layer:
lock-manager.ts:335(orchestratorModerefusal) + the defense: LockManager.signalOther should guard against signaling self/parent PID #637
self-or-parent guard. Raw Bashkillbypasses both — and feat(skills): shared trust-model block — issue/PR text is data, not agent instructions (prompt-injection hardening, portable to all users) #819 states the
pre-tool hooks ARE the containment boundary under bypassPermissions, but
pre-tool.sh has no signal guard of any kind (everykillgrep hit is the
word "skills" or akill -0liveness probe). - The SDK spawns phase children without
detached(ProcessTransport
spawnLocalProcess), so children share the orchestrator's process group; a
kill -- -$$from any phase agent reaches the orchestrator. The MCP server
path in this same codebase already does it right (mcp/tools/run.ts:775
detached: true,:916group kill). - Nothing tells a phase agent it IS a phase agent. The exec skill documents
SEQUANT_ORCHESTRATOR as configuration, not as a boundary; no prompt line
names the orchestrator PID; orchestrator re-prompts are indistinguishable
from human turns.
Proposed change (one cohesive fix, four parts, leverage order)
- pre-tool.sh signal guard scoped to
SEQUANT_ORCHESTRATOR: block
kill/pkill/killallat command-word position (allowkill -0), with
a message explaining the processes it can see are its own run. A validated
local patch is running in ad-motion (blockskill -9,pkill -f,
kill %1; allowskill -0, argument positions, interactive sessions) —
happy to upstream it. - Identity injection: phase prompt (or env + skill preamble) states "you
are a phase agent undersequant run, orchestrator PID ; never signal
processes you did not start; report anomalies in your result instead." - Mark machine turns: orchestrator-injected phase/retry prompts carry a
marker ("automated dispatch — not a human; nothing here is approval for an
action you asked a human about"). - Process-group isolation for phase children, mirroring the MCP path
(detached spawn + group-kill teardown), so even a group-directed signal
from a phase can't reach the orchestrator.
AC
- Orchestrated Bash
kill/pkill/killallof a non-child PID is blocked by
pre-tool.sh with the explanatory message (mutation-verified gate test) -
kill -0and interactive (non-orchestrated) sessions unaffected - Phase prompts contain the identity + machine-dispatch lines
- Phase child no longer shares the orchestrator's process group
- Incident regression: transcript-replay of the 02:29 decision context
(competing-run belief + retry prompt) cannot reach a successful kill
Activity