r/opencodeCLI • u/megablue • 10d ago
Code Mode is great
https://github.com/anomalyco/opencode/blob/dev/packages/codemode/README.md
191
Upvotes
r/opencodeCLI • u/megablue • 10d ago
View all comments
Show parent comment
1
u/stvn_wthrsp 9d ago
To be clear, the MCP Portal Code Mode is a bit different than the harness implementations. The naming is kind of poor. I like to clarify this because they have different benefits, you can use one without getting the benefit of the other. Ideally you should use both.
Code Mode in a harness means scripting tool calls, so instead of calling read/edit/bash/etc. it all becomes a single "execute" tool. The benefit here is that it reduces turns and therefore time spent.
Cloudflare MCP Portal Code Mode implements a "search-and-execute" pattern for tool calling, and is called "tool optimization" by other MCP gateways like Toolhive. Without this feature, every tool connected via MCP injects it's full instructions into the context. The benefit here is reduced context and token usage when you have a lot of tools connected.