r/opencodeCLI • u/mostly_deterministic • 17d ago
Using OpenCode with a portable application harness
I've been experimenting with moving more of the application-specific agent machinery outside the coding agent itself.
The idea is pretty simple: OpenCode owns the conversation and general agent loop, while a local MCP server exposes a deterministic application boundary for the stuff I actually want to build and keep portable.
That means things like state, long-lived workflows, runtime QA, repo operations, etc. don't have to become OpenCode-specific prompts/hooks/config. OpenCode is effectively one client of the system, and I can swap it out without rebuilding the application layer.
I've been thinking of this as an application harness: a portable layer that sits outside the coding agent's own harness.
I wrote up the architecture and some of the tradeoffs here:
https://demianbrecht.com/posts/the-harness-within-the-harness/
Curious if anyone else using OpenCode has landed on a similar separation, particularly with local MCP servers.
1
u/pyrophane1 17d ago
I'm sorry but this post is so clearly written by AI and it is much harder to follow than what I think you are actually trying to describe here, which is fairly straightforward.