# Yoke configuration (saga mode) # Lines starting with # are comments. Blank lines are ignored. # ── Backend ──────────────────────────────────────────────────────────── # Model to use for the agent. If unset, defaults to Claude CLI. # Use provider/model format for OpenRouter or other opencode providers. # model openrouter/anthropic/claude-sonnet-4 # model openai/gpt-4o # model anthropic/claude-sonnet-4 # ── Sandbox ────────────────────────────────────────────────────────── # Docker image to run the agent inside. Required unless you pass --no-sandbox. # Note: sandbox is not currently supported with the 'model' directive. image claude-code-sandbox:latest # ── Output ─────────────────────────────────────────────────────────── # Max lines of tail output kept per guard in guard-results.md. max-tail 200 # Uncomment to save raw stream-json output per iteration. # log-dir .loop/logs # ── Scope rules (diff boundary enforcement) ────────────────────────── # Controls what files the agent is allowed to change. Most-specific # (longest prefix) match wins. # # allow — any change permitted (add, modify, delete) # add-only — new files only; existing files cannot be modified # no-modify — no changes at all (adds or modifications rejected) allow . # ── Guards (run after each plan stage, fail-fast) ──────────────────── # Shell commands executed after each agent iteration. If any guard # exits non-zero the iteration fails and results are fed back. # # NOTE: avoid "cargo check" as the sole guard — its type-error output # can confuse the agent into chasing compiler noise instead of finishing # the task. Prefer a test suite or linter that validates behaviour. # guard cargo check # ── Judge cadence ───────────────────────────────────────────────────── # By default the judge runs only after the worker signals DONE. # Set judge-every to fire the judge as a quality checkpoint every N # worker iterations (it still always fires on DONE too). # # judge-every 5 # Max consecutive judge failures before bailing out (default: 3). # The counter resets to 0 after any passing verdict. # # max-judge-failures 3 # ── Periodic agents (cadence-based supplementary agents) ────────────── # Invoke an additional agent protocol at a fixed cadence (every N # worker iterations). Useful for code cleanup, review passes, etc. # The agent name is derived from the filename (cleaner.md → "cleaner"). # # periodic # # periodic .loop/cleaner.md 10 # Guards that run after a specific periodic agent completes. Results # are written to .loop/periodic--results.md (separate from the # worker's guard-results.md so the worker isn't confused). # # guard-after # # guard-after cleaner cargo test