[FEATURE]: code critic #4068

Open
opened 2026-02-16 17:42:30 -05:00 by yindo · 4 comments
Owner

Originally created by @Githubguy132010 on GitHub (Jan 1, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would like a code critic agent built into opencode that checks the main agents work. The critic looks at the goal (prompt) and checks the code and tests the app if applicable to check if the goal is reached with the current implementation. If not, start a subagent to fix the code review issues. Then run the critic again. This loops for a configurable amount of turns or until there are no issues. The critic should be a subagent.

Originally created by @Githubguy132010 on GitHub (Jan 1, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I would like a code critic agent built into opencode that checks the main agents work. The critic looks at the goal (prompt) and checks the code and tests the app if applicable to check if the goal is reached with the current implementation. If not, start a subagent to fix the code review issues. Then run the critic again. This loops for a configurable amount of turns or until there are no issues. The critic should be a subagent.
yindo added the discussion label 2026-02-16 17:42:30 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 1, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6584: [FEATURE]: Agent-level resume for subagents (resumeSessionId parameter) - This feature request discusses managing stateful subagent workflows, which would be essential for implementing a code critic agent that needs to maintain context across multiple validation loops.

Feel free to ignore if this doesn't address your specific case.

@github-actions[bot] commented on GitHub (Jan 1, 2026): This issue might be a duplicate of existing issues. Please check: - #6584: [FEATURE]: Agent-level resume for subagents (resumeSessionId parameter) - This feature request discusses managing stateful subagent workflows, which would be essential for implementing a code critic agent that needs to maintain context across multiple validation loops. Feel free to ignore if this doesn't address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Jan 1, 2026):

We kinda have this in the form of the "/review" command, we are going to make it a proper subagent

@rekram1-node commented on GitHub (Jan 1, 2026): We kinda have this in the form of the "/review" command, we are going to make it a proper subagent
Author
Owner

@Githubguy132010 commented on GitHub (Jan 1, 2026):

We also could automatically trigger /review in a new session after said task is complete, but that would mean that the review agent needs to read from the previous thread for extra context, which is currently not implemented.

@Githubguy132010 commented on GitHub (Jan 1, 2026): We also could automatically trigger /review in a new session after said task is complete, but that would mean that the review agent needs to read from the previous thread for extra context, which is currently not implemented.
Author
Owner

@Githubguy132010 commented on GitHub (Jan 2, 2026):

We kinda have this in the form of the "/review" command, we are going to make it a proper subagent

@rekram1-node I implemented this on a new branch. It's essentially the same as /review, but the main agent can trigger it as a subagent. It uses the same prompt as /review and has the same permissions. Ran my code through /review and recieved LGTM/green light. Also tested it and I can confirm its working. Am I allowed to open a PR for this change?

@Githubguy132010 commented on GitHub (Jan 2, 2026): > We kinda have this in the form of the "/review" command, we are going to make it a proper subagent @rekram1-node I implemented this on a new branch. It's essentially the same as /review, but the main agent can trigger it as a subagent. It uses the same prompt as /review and has the same permissions. Ran my code through /review and recieved LGTM/green light. Also tested it and I can confirm its working. Am I allowed to open a PR for this change?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4068