# I built OpenCode Nexus: A multi-agent workflow plugin for OpenCode that prevents context loss and enforces two-stage code reviews.

> Source: <https://dev.to/m_d_d3d89483af599cb30a70f/i-built-opencode-nexus-a-multi-agent-workflow-plugin-for-opencode-that-prevents-context-loss-and-31mi>
> Published: 2026-06-21 15:05:11+00:00

Hi everyone,

I've been experimenting with multi-agent workflows for coding, and I kept running into the common issue of agents losing context or merging bad code without proper reviews. To solve this, I built OpenCode Nexus, an open-source, shareable multi-agent workflow plugin for OpenCode.

It sets up a structured pipeline with four specialized agents and strong context-preservation defaults so you don't have to micromanage the AI.

Key Features:

4 Specialized Agents:

Orchestrator: Primary controller that delegates tasks.

Implementer: Subagent that writes the code.

Spec Reviewer: Ensures the implementation matches the original requirements.

Code Reviewer: Checks for code quality and best practices.

Context Preservation: Prevents context loss by persisting state in durable files under .opencode/ (plans, context, tasks, and handoffs) instead of relying solely on transient chat history.

Two-Stage Review Process: Enforces spec compliance first, then code quality.

Git-Aware: Uses feature branches for precise review boundaries (git diff main...feature/task-N). Final branch integration is kept as an explicit user decision.

Fully Customizable Models: Models aren't hardcoded. You can use your own API keys, but it defaults to highly capable, low-cost open-source models (like DeepSeek V4 and MiniMax M3).

You can check out the code, installation instructions, and workflow skills here:

🔗 GitHub: [https://github.com/mohammad154/opencode-nexus](https://github.com/mohammad154/opencode-nexus)

I'd love to hear your feedback, feature requests, or contributions! Let me know what you think.
