Skip to content

fix: properly inherit agent model from main#144

Merged
obra merged 1 commit intoobra:mainfrom
egornomic:fix/agent-model-defaults-to-sonnet
Dec 24, 2025
Merged

fix: properly inherit agent model from main#144
obra merged 1 commit intoobra:mainfrom
egornomic:fix/agent-model-defaults-to-sonnet

Conversation

@egornomic
Copy link
Contributor

@egornomic egornomic commented Dec 5, 2025

#120 removed model name from subagent which made it to default to sonnet instead of a model from global user settings. According to the docs, to properly inherit model from the main conversation, subagent model should be specified as inherit.

Motivation and Context

Discussed in the #120.

How Has This Been Tested?

image image

Breaking Changes

No.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Summary by CodeRabbit

  • Documentation
    • Expanded code-review agent guidance into a comprehensive implementation plan: multi-section guidelines covering plan alignment analysis, code quality assessment, architecture and design review, documentation and standards, issue identification with recommendations, and communication protocol. Retains original problem description while detailing the expected evaluation workflow and output structure.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Walkthrough

Replaced the minimal agent descriptor in agents/code-reviewer.md with an expanded implementation plan and guidance for a code-review agent, adding multi-section workflow items: Plan Alignment Analysis, Code Quality Assessment, Architecture and Design Review, Documentation and Standards, Issue Identification and Recommendations, and Communication Protocol. No public API changes.

Changes

Cohort / File(s) Change Summary
Agent Configuration & Guidance
agents/code-reviewer.md
Replaced model spec (opusinherit); replaced minimal descriptor with a comprehensive, multi-section code-review workflow and output structure covering plan alignment, code quality, architecture/design, documentation/standards, issue identification, recommendations, and communication protocol.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single documentation/config change in one file.
  • Review focus:
    • Confirm model change from opusinherit is intentional and consistent with other agents.
    • Validate clarity, completeness, and consistency of the added review workflow sections.

Poem

🐰 I swapped my model and learned a new art,
Six gentle sections to do a reviewer's part.
I nibble at docs and hop through design,
Spotting small issues, leaving notes that are kind.
🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'fix: properly inherit agent model from main' does not match the actual change, which sets the default agent model to 'opus'. The title suggests a fix for model inheritance, but the raw summary shows the change adds comprehensive code-reviewing guidelines to agents/code-reviewer.md, not an agent model inheritance fix. Update the title to accurately reflect the main change, such as 'docs: add comprehensive code-reviewing guidelines for agent' or align the implementation with the stated title objective.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@egornomic egornomic force-pushed the fix/agent-model-defaults-to-sonnet branch from cc1b80e to d2d5f6c Compare December 5, 2025 13:11
@egornomic egornomic force-pushed the fix/agent-model-defaults-to-sonnet branch from d2d5f6c to 4215572 Compare December 5, 2025 13:39
@egornomic egornomic changed the title fix: default agent model to opus fix: properly inherit agent model from main Dec 5, 2025
@egornomic
Copy link
Contributor Author

@obra please check this PR for v4: all dispatched subagents use Sonnet by default unless a model is specified in the agent file. For example, in v4, one of the skills asks to dispatch the "implementer" agent. Unless the subagent "implementer" is created with a specified model, it will use Sonnet.

@obra obra merged commit e64ad67 into obra:main Dec 24, 2025
1 check passed
pcvelz pushed a commit to pcvelz/superpowers that referenced this pull request Jan 30, 2026
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.

2 participants