anomalyco / anomalyco/opencode

Custom primary agents instantly hit "Free usage exceeded" on opencode/big-pickle while built-in build/plan work (A-B-A reproduced)

Open
#42,004 0 comments 0 reactions 1 assignee View on GitHub

@MrMushrooooom is already working on this.

Since Aug 12, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Summary

On the Zen free tier (opencode/big-pickle), any custom primary agent defined in
.opencode/agents/*.md that has a body (custom system prompt) fails on its very
first request with Free usage exceeded, subscribe to Go [retrying...]
(server log: AI_APICallError: Error from provider (Console): Rate limit exceeded. Please try again later.).

The built-in build and plan agents work fine in the same session, same account,
same model, seconds apart
. Context size is not the cause — the failing request has
0 tokens of conversation context.

Environment

  • opencode 1.18.16 (TUI and opencode run, Windows)
  • Provider/model on every request (verified in logs): providerID=opencode modelID=big-pickle
  • No model/provider pin anywhere: agent frontmatter only has description + mode: primary;
    no model field in project or global config
  • Reproduced identically on two independent machines/accounts

Reproduction (A-B-A)

  1. Create .opencode/agents/ztest.md:
    ---
    description: throttle test
    

    description: throttle test
    mode: primary

    Reply with OK only.
  2. Run the following back-to-back (~30s total):
    • opencode run with agent buildworks
    • agent ztest (with body) → fails instantly (Rate limit exceeded, retries forever)
    • agent ztest with the body removed (frontmatter only, default system prompt applies) → works
    • body added back → fails again (~0.6s)

The only variable changed between pass and fail is the agent body / system prompt content.
Agent name, mode: primary, tools, temperature, model are identical.

Additional observation

The internal title-generation request (agent=title, small=true — also a non-default
prompt) was throttled with the same error in the same second in which a build
main request succeeded. So the limiter appears to differentiate by request content
(default vs. non-default system prompt), not by actual usage volume.

Log excerpt (timestamps UTC):

11:18:20 stream providerID=opencode modelID=big-pickle small=false agent=build mode=primary   -> success
11:18:45 stream providerID=opencode modelID=big-pickle small=false agent=ztest mode=primary   -> stream error: Rate limit exceeded (0.35s)
11:22:09 stream ... agent=build   -> success
11:22:13 AI_RetryError: Failed after 3 attempts ... Rate limit exceeded (agent=title, same account, same window)
11:23:41 stream ... agent=ztest (no body, default prompt) -> success
11:24:27 stream ... agent=ztest (body restored)           -> stream error: Rate limit exceeded (0.6s)

Expected

Either custom primary agents are subject to the same free-tier limits as built-in
agents, or the limitation is documented (docs currently say primary agents without a
model pin use the globally configured model; there is no mention of free-tier
restrictions for custom agents/prompts).

Question

Is this intended behavior of the free tier (custom system prompts excluded), or a bug
in the gateway's rate limiting? If intended, a clear error message ("custom agents
require a subscription") instead of a generic rate-limit error would save users a lot
of debugging.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.