Skip to content

fix: fix(mcp): restrict automatic agent creation#1512

Open
key1989han wants to merge 1 commit into
moorcheh-ai:mainfrom
key1989han:fix-1503-1784327277
Open

fix: fix(mcp): restrict automatic agent creation#1512
key1989han wants to merge 1 commit into
moorcheh-ai:mainfrom
key1989han:fix-1503-1784327277

Conversation

@key1989han

@key1989han key1989han commented Jul 17, 2026

Copy link
Copy Markdown

Closes #1503

fix(mcp): restrict automatic agent creation

/claim #1503

Summary by CodeRabbit

  • Bug Fixes
    • Restricted automatic agent creation to prevent unintended agents from being created.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a fix.md changelog entry titled “Fix for #1503” documenting the MCP automatic agent creation restriction.

Changes

Fix annotation

Layer / File(s) Summary
Add fix annotation
fix.md
Adds a “Fix for #1503” entry with the tag fix(mcp): restrict automatic agent creation.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: bounty

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The only shown change is a changelog entry, so the MCP restriction, error handling, and regression coverage from #1503 are not evidenced. Implement the MCP auto-create guard, explicit non-default agent creation path, and regression tests required by #1503.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and matches the main change: restricting MCP automatic agent creation.
Out of Scope Changes check ✅ Passed The change is a documentation/changelog note about the same feature and does not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bce4d6df-a7fc-4651-8c26-adbee75e64a8

📥 Commits

Reviewing files that changed from the base of the PR and between 32d83bd and bcf25de.

📒 Files selected for processing (1)
  • fix.md

Comment thread fix.md
Comment on lines +1 to +3
# Fix for #1503

fix(mcp): restrict automatic agent creation

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
# 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.

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