- Run
opencode modelsand confirm the configured model IDs exist. - Verify network connectivity and provider credentials.
- Check runtime cooldown state under
.opencode/agent-loop-state/. - Query recent provider and model-attempt events.
- Wait for the configured cooldown or select a different provider.
node scripts/query-events.mjs --task <task-id> --format summaryDo not restart the request under a new task ID. Inspect the returned budget snapshot and event stream:
node scripts/query-events.mjs --task <task-id> --type budget.exceeded --format jsonRaise a budget only after reviewing why the task consumed it. Persistent budget state lives under .opencode/agent-loop-state/ and survives plugin restarts.
The slash command requires OpenCode's interactive TUI. Start opencode, then enter /feature <description>. Use /loop <description> for direct access to the custom tool.
- Run
npm ciin this package. - Read the target project's
AGENTS.mdfor its exact commands. - Run
npm run validatein the agent-loop package. - Inspect the attempt log and structured event log.
- Run
opencode models. - Check
config/free-first-pools.jsonfor the role. - Check
config/model-registry.jsonfor retirement or disabled status. - Confirm the provider adapter recognizes the model prefix.
Local and Ollama IDs use the local timeout key, including IDs without a slash such as ollama-9b-local. Adjust general.local_model_request_timeout_seconds or provider_timeouts_ms.local.
maxRetries controls retries of the same model for transient failures. Provider failover is separate. Authentication, billing, safety, invalid-request, task-quality, and budget failures are terminal and are not retried.
The orchestrator preserves unrelated changes. Commit or stash them yourself, or ensure the intended feature diff can be staged independently. The loop must not discard unrelated work.
Run the OpenCode compatibility workflow manually. It clones the configured upstream revision, checks the patch, installs Bun dependencies, builds a standalone binary, and runs the compatibility probe. A clean git apply is necessary but not sufficient; build and behavior checks must pass.
Use WSL 2 or Git Bash for installation. The Node runtime is tested natively on Windows, but Bash installation and permission-validation scripts require a POSIX-compatible shell. See Platform Support.
Runtime logging recursively redacts credential-like fields and common token, bearer, environment-secret, and private-key formats. This is defense in depth. Never place credentials or production data in prompts, and review logs before sharing them.
Attempt logs are written under .opencode/agent-loop-logs/. Structured events and persistent budgets are under .opencode/agent-loop-state/.
npm ci
npm run validate