- Meta Agent decides what should be done.
- SubTurtle executes one focused backlog item at a time.
- State is tracked in
.subturtles/<name>/CLAUDE.md. - Completion is signaled by appending
## Loop ControlandSTOP.
What a SubTurtle Is
A SubTurtle is a worker process started by./super_turtle/subturtle/ctl spawn that runs an autonomous coding loop (slow, yolo, yolo-codex, or yolo-codex-spark).
Each SubTurtle:
- Runs in its own workspace:
.subturtles/<name>/ - Reads and writes only its own task state file
- Works from repo root, so it can modify project code
- Is constrained by a timeout watchdog
- Is supervised by recurring, silent cron check-ins
ctl spawn defaults are --type yolo, --timeout 1h, and --cron-interval 10m.
Supervision is registered with silent: true by default.
(META_SHARED.md currently describes a 5-minute target cadence, but the executable default in ctl is 10 minutes unless overridden.)Workspace Structure
Example workspace for a SubTurtle nameddocs-agent:
ctl spawn seeds CLAUDE.md, creates the AGENTS.md symlink, starts the SubTurtle, and registers recurring cron supervision.
When a SubTurtle is stopped (manually or via self-stop cleanup), its workspace is archived to .subturtles/.archive/<name>/.
State File Ownership
CLAUDE.md is the contract between Meta Agent and SubTurtle.
- Meta Agent provides initial task state (typically via
ctl spawn --state-file <path>or piped stdin; low-levelctl startexpectsCLAUDE.mdto already exist). - SubTurtle reads it each iteration, does one commit-sized slice, and updates backlog progress.
- Supervisor check-ins inspect this file to determine
Finished,Milestone,Stuck, orErrorevents.
Self-Completion via Loop Control
When all backlog items are complete, the SubTurtle appends:ctl stop semantics to remove recurring cron supervision and archive the workspace.
Timeout and Watchdog
SubTurtles are protected by a watchdog created at start:- Watchdog sleeps until timeout.
- If worker is still running, send
SIGTERM. - Wait 5 seconds.
- If still running, send
SIGKILL.
30m, 1h, 2h, 1d, or raw seconds like 3600).
End-to-End Flow
Meta Agent provides state
It provides initial task state (current task, end goal, backlog) via
--state-file or stdin to ctl spawn.SubTurtle iterates autonomously
It reads state, implements one focused change, verifies, updates state, and commits.
