Killswitch
The killswitch stops an agent after a configured process runtime, at a fixed calendar deadline, or whichever limit is reached first. Use it as a safety boundary for time-limited operations, not as the only retirement mechanism.
Quick configuration
kill-switch: 7
kill-switch-date: '2026-12-31'
The equivalent options are --kill-switch DAYS and --kill-switch-date YYYY-MM-DD. The duration defaults to seven days and 0 disables it. The date is disabled when omitted or empty.
Behavior
The duration timer starts when the agent process starts. A process restart starts a new duration timer and can therefore extend the effective lifetime beyond the configured number of days.
The date is an absolute calendar deadline and is not reset by restarting the process:
- When working-days scheduling is enabled, the agent expires immediately after the inclusive
working-day-endminute on the configured date, interpreted inworking-day-timezone. For example, an end time of17:00expires at17:01:00. - Otherwise, it expires at
23:59:59on the configured date, interpreted inworking-day-timezonewhen one is supplied or in the host’s local timezone when it is empty. - An agent starting at or after the deadline exits immediately, before background or network activity begins.
- A running or waiting agent exits when the deadline is reached.
- The agent reevaluates the wall clock at least once per minute, so clock corrections do not leave the deadline tied to a stale startup-time duration. With a stable clock, it wakes at the exact resolved deadline.
- When both settings are enabled, the earliest deadline wins. Disabling one does not disable the other.
When a killswitch activates, active SSH channels and in-memory persistent sessions end. An agent that starts with an already-expired absolute deadline exits with code 4.
Both killswitch forms apply to normal and mini agents. Normal agents accept CLI, YAML, runtime environment, and compiled defaults. Mini agents use the AGENT__KILL_SWITCH and AGENT__KILL_SWITCH_DATE values embedded at build time.
Operational limitations
- It does not remove the agent binary or its server-side record.
- Confirm retirement with
tealc list, then remove the binary and server record separately when required.