Skip to content

Conversation

@vsumner
Copy link
Contributor

@vsumner vsumner commented Jan 19, 2026

Summary

  • introduce shared agent factory helpers for consistent config
  • update built-in agents to use the new factory pattern
  • document model override behavior in AGENTS.md

Summary by cubic

Standardized agent creation with shared factories and refactored built-in agents to use them, ensuring consistent model-specific config and tool restrictions. Updated AGENTS.md to document the factory pattern and model override behavior.

  • Refactors

    • Added agent factory utilities: createAgentFactory, createGptAgentFactory, createClaudeAgentFactory, createUnrestrictedAgentFactory, plus isClaudeModel.
    • Migrated Oracle, Librarian, Explore, Frontend UI/UX Engineer, Document Writer, Metis, Momus, Multimodal Looker to factories; auto-applies reasoningEffort (GPT) or thinking (Claude) and centralizes tool restrictions.
    • Expanded AGENTS.md with factory usage, options, model detection, and tool restriction guidance.
  • Migration

    • Use factory functions for new/updated agents; pass restrictedTools or allowedTools via options.
    • Rely on factory defaults for GPT vs Claude (reasoningEffort "medium"; thinking enabled with 32k tokens); avoid setting these manually.
    • No breaking changes; existing agent exports and names stay the same.

Written for commit 583ae8b. Summary will update on new commits.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 11 files

Confidence score: 3/5

  • Potential mismatch in model settings: src/agents/utils/factory.ts picks config based on resolvedModel even when extra.model overrides the final config.model, which could apply the wrong model-specific config at runtime.
  • Risk is moderate because this is a concrete behavior change with user-facing impact when extra.model is used, but limited in scope to model selection logic.
  • Pay close attention to src/agents/utils/factory.ts - model-specific config selection may not align with extra.model overrides.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/agents/utils/factory.ts">

<violation number="1" location="src/agents/utils/factory.ts:76">
P2: Model-specific config is chosen using `resolvedModel` even though `extra` can override the final `config.model`, producing mismatched model settings when `extra.model` differs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant