fix: fix(mcp): restrict automatic agent creation#1512
Conversation
📝 WalkthroughWalkthroughAdds a ChangesFix annotation
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@fix.md`:
- Around line 1-3: Update the `#1503` changelog entry to explicitly state that
automatic creation is limited to MEMANTO_DEFAULT_AGENT_ID; missing non-default
agents must raise AgentNotFoundError and require explicit creation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| # Fix for #1503 | ||
|
|
||
| fix(mcp): restrict automatic agent creation |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Document the precise agent-creation boundary.
This entry is too vague for #1503. State that only MEMANTO_DEFAULT_AGENT_ID may be auto-created; missing non-default agents must raise AgentNotFoundError and require explicit creation.
Suggested clarification
# Fix for `#1503`
fix(mcp): restrict automatic agent creation
+
+Only the configured default agent may be auto-created. Non-default agents
+must already exist and otherwise raise `AgentNotFoundError`.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Fix for #1503 | |
| fix(mcp): restrict automatic agent creation | |
| # Fix for `#1503` | |
| fix(mcp): restrict automatic agent creation | |
| Only the configured default agent may be auto-created. Non-default agents | |
| must already exist and otherwise raise `AgentNotFoundError`. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@fix.md` around lines 1 - 3, Update the `#1503` changelog entry to explicitly
state that automatic creation is limited to MEMANTO_DEFAULT_AGENT_ID; missing
non-default agents must raise AgentNotFoundError and require explicit creation.
Closes #1503
fix(mcp): restrict automatic agent creation
/claim #1503
Summary by CodeRabbit