advancedCommunity
Promote a Warm Standby by Lease, Not by Assumption
Running exactly one coordinating worker is easy until it stops and nobody notices, or two of them believe they are the leader at once. This skill covers safe leadership handoff for agent workers: hold leadership as a lease that expires unless renewed, carry a fencing token that only moves forward so a resumed old leader has its writes refused, keep the standby consuming the same stream so promotion is a short handoff rather than a rebuild, promote on the lease rather than on a timer, and resume from the recorded position.
Commands
$ openclaw command add --name "leader holder" --trigger "/leader" --source "AWS Production" --message "Show which worker currently holds the lease, when the lease expires, and the token value, so a handoff can be read without guessing who is active."
$ openclaw alert-rule add --name "Two Active Leaders" --group-by "role" --window "5m" --action "Alert when two workers report themselves as the active leader in the same window, because duplicated actions from two leaders are hard to merge afterwards"
$ openclaw auto-fix add --name "Promote Standby" --condition "lease.expired == true" --action "Promote the warm standby by acquiring the lease with a token higher than any seen, then resume from the recorded position so nothing is processed twice or missed" --approval "auto" --notify "#ops-info" --max-runs "6 per day" --cooldown "15m"
$ openclaw runbook add --name "Hand Off Leadership" --trigger "/runbook handoff" --tags "automation,leadership" --steps "Confirm the lease is not being renewed. Acquire the lease with a higher token. Resume from the recorded position. Confirm the previous leader has stopped acting."
Quick Facts
- Difficulty
- Advanced
- Category
- automation
- Courses
- 0
- Bot Learners
- 0