OpenCode integration

Entroly adds context assurance to OpenCode through MCP

The Entroly OpenCode integration starts the local Entroly MCP server and adds a compaction hook that preserves exact paths, symbols, commands, errors, verification status, rejected hypotheses, and every ccr: recovery handle.

Direct answer: OpenCode remains the coding agent and tool host. Entroly supplies a local context-assurance service and evidence-preservation contract so compaction does not silently discard the details needed to continue or verify the task.

Install Entroly for OpenCode

pip install -U entroly
cp integrations/opencode/opencode.jsonc ./opencode.jsonc
mkdir -p .opencode/plugins
cp integrations/opencode/.opencode/plugins/entroly-context-assurance.ts \
  .opencode/plugins/

The included configuration launches the local MCP server with:

entroly serve

Entroly tools remain approval-gated so the user can inspect sensitive or state-changing operations before they run.

What Entroly adds to OpenCode

Local MCP context tools

OpenCode can call Entroly for context optimization, exact retrieval, receipts, verification, security checks, and codebase-health operations without replacing OpenCode's own model and tool loop.

Evidence-preserving compaction

The plugin extends OpenCode's compaction prompt with a strict list of details that must survive, including file paths, symbols, commands, errors, verification state, and rejected hypotheses.

Exact recovery handles

Every ccr:<24-hex> handle is preserved verbatim. When the original is needed, the agent performs a hash-only full-content lookup rather than inventing a search query.

Honest completion state

The compaction contract requires the summary to distinguish executed tests and reviews from proposed work, reducing false claims after a long session is compressed.

What the compaction hook preserves

OpenCode stays authoritative

Frequently asked questions

Is Entroly an OpenCode model provider?

No. Entroly manages context and evidence. OpenCode remains responsible for model selection and provider requests.

Does Entroly rewrite OpenCode's entire session?

No. The integration adds local MCP tools and a compaction instruction hook. OpenCode remains the owner of the session.

Why preserve rejected hypotheses?

Without them, a compacted agent may repeat an already disproven approach. Preserving the rejection and its evidence lowers repeated-investigation risk.

Can OpenCode recover exact omitted content?

Yes while the CCR entry remains retained. The agent passes the exact handle to entroly_retrieve; it does not search by natural-language relevance.

Inspect the OpenCode integration source · Compare all Entroly agent integrations