The Meta Agent reads Claude Code and Codex quota signals, routes work to the best loop type, and adjusts supervision frequency to preserve headroom. Canonical policy lives in:
Signals and Data Sources
The Meta Agent uses two quota inputs:Claude Code usage
getUsageLines() reads OAuth usage from https://api.anthropic.com/api/oauth/usage and formats session + weekly utilization with reset times.Codex quota usage
getCodexQuotaLines() calls codex app-server via JSON-RPC (account/rateLimits/read) and returns 5-hour + weekly usage windows.formatUnifiedUsage(...) and uses shared badge thresholds:
Usage Check Cadence
META_SHARED.md defines when usage should be evaluated:
1
Session start
Check quota state at the beginning of every meta-agent session.
2
During active work
Re-check about every 30 minutes while autonomous work is in progress.
3
Before spawning
If the last reading is stale, refresh usage immediately before spawning new SubTurtles.
Decision Matrix
Use this policy matrix for loop-type routing and user messaging:Default coding loop type is
yolo-codex. Use yolo or slow only when deeper Claude reasoning/review is actually needed.Cron Frequency Adaptation
When Claude usage pressure increases, stretch supervision intervals to reduce meta overhead. Policy rule:Practical Routing Flow
Failure and Partial-Data Handling
If one provider’s metrics are missing,formatUnifiedUsage(...) reports partial state (❓) instead of guessing.Routing should then prefer conservative defaults (
yolo-codex) until a fresh measurement is available, unless there is a clear provider-specific limit error.
