-
Notifications
You must be signed in to change notification settings - Fork 1k
[compound-engineering] Bug: ce:review reviewer subagents may recurse into ce:review #526
Description
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-reviewrecursion fix fromcompound-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:reviewspawned 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:reviewitself
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:
- determine review scope
- spawn its selected reviewer personas once
- collect and synthesize their findings
- 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
- Invoke
ce:reviewas a skill inside a larger workflow or skill-driven context. - Let
ce:reviewreach its reviewer dispatch stage. - Observe reviewer personas being spawned.
- In at least one observed case, one of those reviewer personas appears to re-enter
ce:reviewinstead of staying inside its delegated reviewer role. - 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-reviewwas 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:reviewappears 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:reviewworkflow 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