A newly documented Mac development setup combines OpenCode with locally hosted Ollama models and Docker sandboxes, offering one example of how coding agents can run without sending every inference to a remote model provider. The workflow is aimed at Apple Silicon machines with enough unified memory to hold models in the roughly 30-billion-parameter range.
The author tested the configuration on a 48GB MacBook Pro and describes that capacity as a practical point for running larger local models with useful context windows. Ollama serves the models and now includes MLX support for Apple hardware, while OpenCode provides the coding-agent interface. Docker’s sandbox tooling, referred to as sbx, contains the agent’s access to each project.
The guide recommends two models for different workloads: a 27-billion-parameter Qwen 3.8 variant and a 31-billion-parameter Gemma 4 variant. The listed quantized downloads require about 32GB and 34GB respectively. Standard MLX variants are offered as alternatives, depending on the machine. Those recommendations reflect the author’s own setup rather than a universal performance comparison.
Memory management is an important part of the configuration. The Qwen model is limited to a 64,000-token context so that model use does not consume all available memory, while roughly 3GB is reserved for the sandbox. Users with less memory would need smaller models, shorter contexts or a different balance between the model and container.
The sandbox layer addresses a separate issue from privacy. Running inference locally keeps model requests on the machine, but a coding agent can still execute an incorrect command or modify unintended files. A project-specific container limits the environment in which those actions take place. The guide requires an sbx kit for each project and notes that users must sign in to Docker to use the feature.
This arrangement shows the multiple components involved in practical local-agent use. The language model consumes most of the memory; Ollama handles serving; OpenCode manages the interactive agent loop; and the container provides an operational boundary. None of those pieces alone supplies the complete workflow.
Local models still involve trade-offs in speed, capability, disk use and setup complexity. They may not match remote frontier systems on every coding task, particularly where long context or difficult reasoning is required. But improving open models and Apple’s shared-memory architecture are making private, self-hosted agent workflows more feasible. The documented stack provides a reproducible starting point for developers who want that control while retaining a sandbox around automated code execution.



