Skip to content

Subagent fallback chain prepends incorrect opencode/ prefix to model names, causing infinite retry loop #34043

Description

@maxxua

Description

Description

When a background subagent task is spawned (e.g. task(category="unspecified-high", run_in_background=true)), the initially assigned model nvidia/z-ai/glm-5.1 returns HTTP 429 (Too Many Requests). The system then enters a fallback chain, but every fallback model name incorrectly includes an opencode/ prefix that the platform's model registry does not recognize.

Error Chain

Initial: nvidia/z-ai/glm-5.1 → 429
Fallback #1: opencode/claude-opus-4-7 → Model not found. Did you mean: claude-opus-4-7?
Fallback #2: opencode/gpt-5.5 → Model not found. Did you mean: gpt-5.5, gpt-5.5-pro?
Fallback #3: opencode/glm-5 → Model not found. Did you mean: glm-5, glm-5.2, glm-5.1?
Fallback #4: opencode/kimi-k2.5 → (same)

Root Cause

Two issues:

  1. Default subagent model nvidia/z-ai/glm-5.1 consistently returns 429 — should be replaced with an available model.
  2. Fallback chain prepends opencode/ to model names (e.g. opencode/claude-opus-4-7), but the platform expects bare names like claude-opus-4-7. The error messages confirm this with "Did you mean: X".

Impact

  • Background subagents (explore, librarian, oracle, etc.) fail unrecoverably when primary model is unavailable
  • Wastes significant tokens on retry loops

Environment

  • User model: opencode/deepseek-v4-flash-free (main session works fine)
  • Plugin: @opencode-ai/plugin@1.14.18
  • Platform: opencode.ai SaaS
  • OS: WSL2 Ubuntu

Plugins

omo, superpowers, openspec

OpenCode version

OpenCode 1.17.9

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions