Resource management keeps Super Turtle autonomous when usage limits get tight.Documentation Index
Fetch the complete documentation index at: https://superturtle.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
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:
Decision Matrix
Use this policy matrix for loop-type routing and user messaging:| Claude Code usage | Codex usage | Meta behavior |
|---|---|---|
<50% | <50% | Normal operations. Any loop type allowed. |
50-80% | <50% | Prefer yolo-codex. Reduce cron supervision to 10m. |
>80% | <50% | Force yolo-codex only. Minimal check-ins (15m). Keep responses shorter. |
Any | >80% | Switch SubTurtles to yolo (Claude) and warn Codex is constrained. |
>80% | >80% | Alert that both pools are constrained and suggest pausing non-critical work. |
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.
