Skip to content

fix(code-review): require explicit user invocation#78425

Open
ZaunEkko wants to merge 1 commit into
anthropics:mainfrom
ZaunEkko:fix/code-review-manual-invocation
Open

fix(code-review): require explicit user invocation#78425
ZaunEkko wants to merge 1 commit into
anthropics:mainfrom
ZaunEkko:fix/code-review-manual-invocation

Conversation

@ZaunEkko

Copy link
Copy Markdown

Summary

  • mark /code-review as manual-only with disable-model-invocation: true
  • preserve explicit user invocation of /code-review and /code-review --comment
  • prevent models and subagents from programmatically re-entering the full multi-agent review workflow

Motivation

The code-review command launches an initial gate agent, a guidance-discovery agent, a change-summary agent, four parallel reviewers, and additional validators for reported findings. Programmatic invocation from one of those descendants can recursively re-enter the complete workflow and multiply the agent tree.

disable-model-invocation is the documented frontmatter control for commands that require explicit user judgment: it keeps the slash command available to users while removing it from the model's programmatic command invocation surface.

This is a plugin-level mitigation related to #77414 and #68110. It cuts off recursive model-initiated re-entry into this specific multi-agent workflow, but it does not replace host-level descendant budgets, breadth limits, resource backpressure, or tree-wide cancellation.

Behavior change

Invocation path Before After
User types /code-review Allowed Allowed
User types /code-review --comment Allowed Allowed
Model or subagent invokes code-review programmatically Allowed Blocked
Subagent directly invokes Agent Allowed Unchanged

Test plan

  • Validate plugins/code-review with claude plugin validate
  • Validate plugins/code-review with claude plugin validate --strict
  • Parse the command frontmatter as YAML and confirm disable-model-invocation is boolean true
  • Run git diff --check
  • Confirm only plugins/code-review/commands/code-review.md changed
  • Confirm the branch is based on the latest upstream/main

No Agent integration test was run because /code-review intentionally launches multiple agents; this PR is limited to static frontmatter and plugin validation on an unrestricted workstation.

Generated with Claude Code

Mark the multi-agent code-review command as manual-only so models and subagents cannot programmatically re-enter the workflow. Explicit /code-review invocation remains available.

Generated with [Claude Code](https://claude.ai/code)

Model: gpt-5.6-sol max

Co-Authored-By: Claude <noreply@anthropic.com>
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