Library › Book 3 › The Dead Man's Switch
The Dead Man's Switch
11.1🔒The Last Line of DefenseEven with all five guardrails in place, there are scenarios where the harness itself fails. The agent might hang in a system call. The…
11.2🔒Implementation in CI/CDThe Dead Man's Switch lives outside the agent and harness. It is configured at the CI runner level.
11.3🔒The Layered Timeout Structure
11.4🔒The Complete Safety StackEach layer catches failures that the inner layer misses: - Guardrails catch agent misbehavior (too many steps, wrong domain) - Per-action…
11.5🔒Process CleanupWhen a Dead Man's Switch triggers, it kills the process abruptly. This can leave zombie processes. Always implement cleanup:
11.6🔒Heartbeat MonitoringFor long-running agent sessions (nightly exploratory tests), implement a heartbeat:
11.7🔒Anti-Pattern: No Kill SwitchThis job can run forever. If the agent enters an infinite loop and the harness fails to detect it, the CI runner is blocked until manually…
11.8🔒Career Translation- Designed and deployed four-layer timeout stack (per-action, per-test, CI job, CI workflow) for agentic test pipeline, eliminating 100% of…
11.9🔒Q&AInterview Depth CheckPrompt: Your agentic test pipeline runs on a shared GitHub Actions runner. Last night, a runaway agent consumed a runner for 6 hours before…