Search

0005: Use Native Out-of-Process Sidecar Extensions

On this page

Status: Proposed Date: 2026-06-25 Supersedes: N/A Superseded by: N/A

Context

Tower extensions provide AST, LSP, lint, formatting, and debug capabilities. Extensions can fail, hang, or be developed independently from the host. They also need constrained access to workspace capabilities such as read file, list files, apply edits, request format, and log.

The project does not want to require a runtime VM, JVM, Node runtime, or container at runtime.

Candidates

OptionProsCons
Native sidecars over JSON-RPC 2.0 stdioFault isolation, no runtime VM, language-independent wire contractRequires process supervision and protocol discipline
In-process pluginsLow overhead and simple callsExtension faults can take down the host
WASM sandboxStrong sandboxing modelAdds runtime complexity and a runtime VM dependency

Decision

We will run extensions as native out-of-process sidecars communicating with the host over JSON-RPC 2.0 on stdio. Each extension declares tools, event subscriptions, and host capabilities in its manifest. The host supervises sidecars with timeouts, restart behavior, shutdown, and quarantine.

Extensions may access workspace state only through declared HostCalls routed by the sidecar adapter.

Consequences

What becomes easier:

  • Extension crashes and hangs do not sever the MCP host.
  • Extension binaries can be built as part of the Rust workspace and shipped without an external runtime.
  • Capability declarations provide an explicit security boundary.

What becomes harder:

  • The sidecar protocol must be carefully versioned and tested.
  • Long-running extension processes need lifecycle supervision and cleanup.

Constitution Compliance

PrincipleStatusJustification
Extension fault isolationCompliantExtensions run outside the host process.
Capability securityCompliantHost access is limited to declared HostCalls.
No runtime VMCompliantNative sidecars avoid a required external VM/runtime.

View original on GitHub