Skip to content

[compound-engineering] Bug: ce:review reviewer subagents may recurse into ce:review #526

@ChushulSuri

Description

@ChushulSuri

Bug Description

Component: Skill not working - ce:review
Summary: ce:review reviewer subagents appear able to recurse back into ce:review when the workflow is invoked as a skill, causing nested review trees instead of a single review pass.

Environment

  • Plugin Version: latest CE upstream content synced into OpenCode Stack, including the document-review recursion fix from compound-engineering-v2.63.0
  • Agent Platform: OpenCode / OpenCode Stack
  • Agent Version: 1.3.17
  • OS: Darwin 25.3.0 x86_64

What Happened

When ce:review was invoked as a skill, we observed one instance where the review appeared to recurse into additional nested review layers instead of staying inside the originally spawned reviewer personas.

This did not present as a hard error message. The failure mode looked behavioral:

  • ce:review spawned its reviewer personas
  • one of those delegated reviewers appeared to re-enter the parent code-review workflow
  • the result looked like nested review trees rather than a single orchestrator pass with leaf reviewers

Important nuance:

  • I am not reporting ordinary parallel reviewer fan-out as the bug
  • the suspected bug is reviewer subagents re-entering ce:review itself

We have not observed this when using the corresponding command path in the same way, only when ce:review was used as a skill.

Expected Behavior

ce:review should:

  1. determine review scope
  2. spawn its selected reviewer personas once
  3. collect and synthesize their findings
  4. return the review result

Reviewer subagents spawned by ce:review should remain leaf reviewers and should not invoke ce:review or other CE review/planning workflows unless explicitly instructed.

Steps to Reproduce

  1. Invoke ce:review as a skill inside a larger workflow or skill-driven context.
  2. Let ce:review reach its reviewer dispatch stage.
  3. Observe reviewer personas being spawned.
  4. In at least one observed case, one of those reviewer personas appears to re-enter ce:review instead of staying inside its delegated reviewer role.
  5. Observe nested review behavior / repeated review fan-out.

Error Messages

No single hard error message was captured.

The issue presented as behavioral recursion:

  • nested review layers
  • apparent re-entry from a delegated reviewer back into ce:review
  • more review orchestration than expected for a single review run

Additional Context

Why this looks plausible from the current prompts:

  • document-review was recently fixed by adding a shared leaf-reviewer guard in its subagent template:
    • “You are a leaf reviewer inside an already-running compound-engineering review workflow. Do not invoke compound-engineering skills or agents unless this template explicitly instructs you to.”
  • ce:review appears not to have the equivalent protection in its own shared reviewer subagent template
  • the individual reviewer agents still only appear guarded against invoking themselves, not against invoking the parent ce:review workflow again
  • in hosts with strong skill-routing behavior, that seems like a plausible re-entry path

So this may be the same bug family as the previous document-review recursion issue, but in the code-review workflow instead of the document-review workflow.

Suggested fix:
Add the same class of parent-workflow guard to the shared ce:review reviewer subagent template, for example:

  • “You are a leaf reviewer inside an already-running compound-engineering review workflow.”
  • “Do not invoke compound-engineering skills or agents unless this template explicitly instructs you to.”
  • “Perform your analysis directly and return findings in the required output format only.”

That would make ce:review consistent with the fix already applied to document-review.


Reported via /report-bug-ce style workflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions