Files
oh-my-opencode/src
MoerAI 6b0628dde5 fix(agents): log warning when a builtin agent is silently skipped due to model availability (fixes #4150)
When AGENT_MODEL_REQUIREMENTS gates an agent (sisyphus / hephaestus / atlas / general agents) and resolution returns no model -- or the requiresModel / requiresAnyModel / requiresProvider constraint is not satisfied by any connected provider -- the agent was being dropped from the registered set with no log, no warning, no doctor signal. Users upgrading from v3 to v4 saw their configured agents disappear from 'opencode agent list' with zero indication of why, and the only debugging path was reading the source.\n\nAdd a log() call at every silent-drop point in the four wrapper files so the user-facing 'oh-my-opencode.log' shows exactly which agent was skipped and which model / provider requirement failed. Follows the existing precedent in src/tools/delegate-task/categories.ts:44 ([resolveCategoryConfig] Category X requires Y but not available) and the in-file precedent in general-agents.ts:86 ([agent-registration] User-configured model not resolved). Zero behavior change -- agents that were skipped before are still skipped now, the only difference is they are no longer silent.\n\nVerification: bun test src/agents/builtin-agents/ -> 27/27 pass. bun test src/agents/ -> 405/405 pass. bun run typecheck -> exit 0. LSP diagnostics clean on all four touched files.
2026-05-22 16:01:13 +09:00
..