Skip to content

fix(agents): load OpenCode reviewer from the Claude persona - #4355

Open
matthewgrossman wants to merge 2 commits into
mainfrom
fix/4354-share-reviewer-agent/matthewgrossman
Open

matthewgrossman wants to merge 2 commits into
mainfrom
fix/4354-share-reviewer-agent/matthewgrossman

Conversation

@matthewgrossman

@matthewgrossman matthewgrossman commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

OpenCode now loads principal-engineer-reviewer from the same file Claude Code and gator use, .claude/agents/principal-engineer-reviewer.md. Before this, the OpenCode copy was a separate file that had drifted behind the Claude copy.

Related Issue

Closes #4354

Changes

  • Deleted the stale .opencode/agents/principal-engineer-reviewer.md.
  • Added .opencode/opencode.jsonc with a principal-engineer-reviewer subagent entry. Its system prompt uses {file:../.claude/agents/principal-engineer-reviewer.md}, and its permissions deny edits.
  • Updated .claude/README.md to say OpenCode loads the Claude personas, so there's only one copy to edit.

The Claude persona, its tools allowlist, and gator are unchanged. The net diff against main is these three files. The first commit tried a symlinked .agents/agents/ layout, and the second commit replaced it. Squash merging leaves only the final layout.

Notes for reviewers:

  • Why not symlinks: OpenCode silently skips any agent whose tools field isn't a map. Claude's comma-separated or YAML-list tools can't be a map. Sharing one Markdown file therefore meant replacing Claude's allowlist with a broader disallowedTools denylist.
  • {file:} isn't documented for OpenCode v2. It's carried over from v1 and works on v2.0.25. If the path breaks, OpenCode fails to load the project config, so the failure is visible rather than silent.
  • OpenCode sees the header as text. Its prompt includes the persona's YAML frontmatter as plain text, which gator's Codex path already does too.
  • The description is in two places, once in each file.

Testing

  • On a fresh copy, opencode debug agents (v2.0.25) shows the reviewer as a subagent with edits denied, and its system prompt is identical to the Claude file.
  • mise run license:check passes.
  • No changes to Claude Code or gator inputs.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Move the reviewer persona to .agents/agents/ and symlink .claude/agents
and .opencode/agents to it, replacing the stale OpenCode copy. Use
frontmatter both harnesses accept: OpenCode drops agents with a Claude
tools allowlist, so restrict Claude with disallowedTools instead. Point
gator's manifest and test at the new path.

Closes #4354

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Replace the symlinked .agents/agents layout with a .opencode/opencode.jsonc
entry whose system prompt uses {file:} to read the Claude persona. The
Claude reviewer keeps its tools allowlist, and gator keeps reading the
existing path.

Closes #4354

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman matthewgrossman changed the title fix(agents): share principal-engineer-reviewer across harnesses fix(agents): load OpenCode reviewer from the Claude persona Oct 8, 2026
@matthewgrossman
matthewgrossman marked this pull request as ready for review October 8, 2026 23:40

This branch has not been deployed

No deployments
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.

bug(agents): OpenCode principal-engineer-reviewer is out of date with the Claude copy

2 participants