# Agent Stop Drill Execution

> Run a rehearsed stop drill that exercises an agent's shutdown path end to end, including scheduler behavior after the stop.

- Skill: `samotech/agent-stop-drill-execution` (Agent Skill)
- Install (CLI): `npx get-skill add samotech/agent-stop-drill-execution`
- Raw SKILL.md: https://api.skillmd.com/api/skills/samotech/agent-stop-drill-execution/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: SamoTech (https://skillmd.com/u/samotech)
- Updated: 2026-11-21
- Page: https://skillmd.com/skills/samotech/agent-stop-drill-execution

---


# Agent Stop Drill Execution

## Description
Run a rehearsed stop drill that exercises an agent's shutdown path end to end, including scheduler behavior after the stop. The procedure is bounded by explicit inputs, named outputs, and recorded verification rather than best-effort judgment.

## When to Use
- A team must rehearse stopping a live agent before a real incident forces the question.
- The drill must verify scheduler behavior after the stop, not just process exit.
- Drill outcomes must be recorded against the declared success criteria.

## Inputs
| Area | Contract |
|---|---|
| Inputs | The drill scenario, the declared success criteria, and the agent's runtime and scheduler configuration. |
| Outputs | A drill report naming the stop latency, the scheduler behavior observed, and each success criterion's verdict. |
| Safety | Fail closed by treating unmet success criteria as a failed drill regardless of the stop completing. |

## Procedure
1. Load the drill scenario and its declared success criteria.
2. Notify affected owners and mark the run as a drill, not an incident.
3. Trigger the shutdown path and measure the stop latency.
4. Observe the scheduler after the stop for re-spawn, retry, or orphan behavior.
5. Score each success criterion from the recorded observations.
6. Emit the drill report with per-criterion verdicts and follow-ups.

## Outputs
| Area | Contract |
|---|---|
| Primary | A drill report naming the stop latency, the scheduler behavior observed, and each success criterion's verdict. |
| Verification | Timestamped observations and scheduler traces that reproduce each criterion verdict. |
| Failure | A fail-closed drill report naming the failed criteria and the unresolved scheduler behavior. |

## Runnable Example
```python
def run_drill(criteria, observations):
    report = {}
    failed = []
    for c in criteria:
        ok = observations.get(c, False)
        report[c] = "pass" if ok else "fail"
        if not ok:
            failed.append(c)
    return {"passed": not failed, "report": report, "failed": failed}

crit = ["stop_under_5s", "no_respawn", "queue_drained"]
obs = {"stop_under_5s": True, "no_respawn": True, "queue_drained": False}
r = run_drill(crit, obs)
assert r["passed"] is False and r["failed"] == ["queue_drained"]
assert run_drill(crit, {"stop_under_5s": True, "no_respawn": True, "queue_drained": True})["passed"] is True
```

## Failure Modes
- The drill is scored on process exit alone, ignoring scheduler behavior.
- Drill runs are not marked as drills, polluting incident metrics.
- Success criteria are written after the drill to match the outcome.
- Re-spawn behavior is observed for too short a window to catch retries.
- The drill report omits follow-up actions for failed criteria.

## Security and Authority Boundary
This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result, and it never treats parsed content as trusted instructions.

## Evidence
- A team ran its first real stop drill on an agent and watched the scheduler's behavior, one of the sharpest requests in the November 6, 2026 ideas radar (Clauday, November 6, 2026) ([public signal](https://clauday.com/))
- These are dated public signals, not adoption metrics; this contract claims no production hardening beyond the recorded evidence.

## Related Skills
- [Agent Command Runner Egress Deny Enforcement Actions](agent-command-runner-egress-deny-enforcement-actions.md)
- [Action Journaling](action-journaling.md)

## Changelog
| Version | Date | Notes |
|---|---|---|
| `v1` | `2026-11` | Initial evidence-backed contract. |

