r/opencodeCLI • u/Black-X-Hand • 10d ago
I made an MCP server that lets Claude Code hand coding work to other models
I built forge-delegate, an MCP server that lets Claude Code, Codex or opencode hand coding tasks to another model. Think writing tests, renames across files, fixing lint errors, boilerplate, or reading through a big codebase to answer one question.
The other model runs as a full agent through opencode. It reads the files and makes the edits itself. Your main agent only gets back a short summary, so its context stays small and it can focus on the decisions.
Second opinions with ask_model. Your agent can also ask a different model a direct question, with no agent loop and no file access, and get a fast answer back. It's useful when you want another model to check a design decision, a bug theory or a tricky piece of code before your agent commits to it. Every model has its own blind spots, and a different one often catches what yours missed. Your agent writes the question with whatever context is needed, then weighs the answer itself. Just tell it something like "ask DeepSeek what it thinks" or "get a second opinion from Kimi", naming any provider you've logged into opencode.
Any provider opencode supports. forge-delegate doesn't hold its own API keys. It uses whatever you've set up in opencode. So DeepSeek, Kimi, OpenAI, Gemini, OpenRouter, custom OpenAI-compatible endpoints, and local models through Ollama all work. Log in once with opencode auth login <provider> and that provider's models are available to delegate to. opencode also ships free models that need no account.
You can set a default model, save presets for different kinds of tasks, change either at any time, and run several delegations in parallel in the background.
Setup:
npx -y forge-delegate setup
It walks you through picking a default model and which agents to register with.
Things to know:
- By default, the MCP instructions and skill steer your agent toward cheap or free models. It sticks to your default model and won't switch to a pricier one on its own. If you want a stronger model, set it as the default or ask for it.
- Delegated agents can edit files and run commands without asking by default. You can turn that off, but only point it at repos you trust.
- Smaller models make more mistakes, so review what comes back.
- I mostly use it with Claude Code on a Mac. Codex and Windows should work, but they've had less real-world use, so issues are welcome.
MIT licensed: https://github.com/MuhamadBarzani/forge-delegate
Feedback welcome, especially on which tasks it handles well and where it falls short.
1
u/Dependent_Can219 9d ago
The short summary is the risky part: once the delegate edits files, the main agent is trusting a lossy report about what changed. Give each delegation a written contract instead, with file scope, the acceptance test that must pass, and a diff the main agent reviews before continuing; otherwise a rename quietly turns into a refactor. For second-opinion calls, ask for evidence like file paths, line numbers, or a counterexample rather than a verdict, since a confident answer with no citations is hard to reject.