← back to Ticket System
CODEX-YOLOFOREVER.md
29 lines
# Codex YOLO Forever
Local unattended Codex ticket loop, scheduled every 10 minutes by launchd. Each invocation is bounded and overlap-safe; the next launch is skipped while a cycle owns the atomic lock.
```sh
scripts/codex-yoloforever.sh status
scripts/codex-yoloforever.sh stop
scripts/codex-yoloforever.sh start
scripts/codex-yoloforever.sh unlock
scripts/codex-yoloforever.sh uninstall
tail -f codex-yoloforever.log
```
`stop` places a durable sentinel and disables future launchd starts. It lets an active cycle finish rather than interrupting a possibly half-completed operation. `start` removes the sentinel, enables the agent, loads it if needed, and kicks one cycle.
If a machine crash leaves the atomic lock behind, `unlock` removes it only when launchd does not report the job running.
The prompt requires a fresh canonical ticket snapshot, DTD selection, canonical-owner execution, Cody's adversarial gate, final DTD, empirical E2E proof, ticket logging, and a JSONL loop ledger. It preserves all normal approval gates. The only carried production approval is the exact TK-10993 scope recorded in the prompt; Track C and E retain their additional proof/order constraints.
Each cycle captures every open task from the live board API in ascending board-rank order,
using `scripts/ordered-open-tickets.js`. The runner passes that snapshot directly to Codex
and retains it at `data/codex-yoloforever/open-queue.json`. If the board read fails or a task
has no valid rank, no worker starts and the next scheduled interval retries.
The worker reviews the complete ordered queue and executes up to six safe increments sequentially,
using cabinet agents and applicable skills. Gates and owner collisions receive an explicit
disposition and do not use execution slots. Independent source changes can use isolated worktrees
when unrelated runtime files are dirty. Source tickets carry completion/blocker evidence;
coordination-only passes use standing TK-11287 rather than creating monitoring tickets.