feat: agentic-ai/opencode local model setup with MLX launch script#19
Conversation
Memory crash investigationReviewed 1. GPU OOM crashes (confirmed)Two crashes with Qwen3.5-9B-4bit on the 16GB Mac Mini: Root cause: The KV cache grows unbounded as conversation context accumulates. Each turn appends to the message history, expanding the prefill KV cache until it exhausts Metal's unified memory allocation. Crashes occurred after 4–6 conversational turns. Fix applied in 86caf28:
2. GLM-4.7-Flash-5bit model unavailableThe model directory at RecommendationConsider documenting these limits in |
|
Try again with MTP. Do some more fine tuning on KV cache, context length, etc. Merging as is as an initial setup for OpenCode |
…ning Fixes GPG commit signing in GUI apps (e.g. Obsidian Git plugin) that don't inherit shell PATH and can't find the gpg binary. Sets gpg.program to /opt/homebrew/bin/gpg in gitconfig and exports GPG_TTY=$(tty) in .zshrc for terminal sessions. Closes #20 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Initial setup of OpenCode as a local AI coding agent, with
opencode-local— a launcher that auto-discovers MLX models, starts an OpenAI-compatible server, and opens OpenCode. Designed to run alongside Claude Code using local models on Apple Silicon.Changes
Main: OpenCode initial setup + local model integration (
opencode-local)agentic-ai/OpenCode/— new directory with config, install script, and launch toolingopencode.json— registersmlx_lm.server(OpenAI-compatible) as a local provider, pre-configured with Qwen 3.5 9B (4bit, MLX)bin/opencode-local— launch script that auto-discovers MLX models in~/.models/, presents a picker, starts the server, waits for it to be ready, then launches OpenCode. Cleans up on exit. Logs to~/.local/share/opencode-local/server.loginstall.sh— symlinksopencode.jsonto~/.config/opencode/andopencode-localto~/.local/bin/README.md— activation, usage, model recommendationsMinor: Ghostty terminfo fix
term = xterm-256colorto macOS and Linux ghostty configs so remote servers that don't recognizexterm-ghosttystill render correctlyHousekeeping
TODO.mdwith ghostty standardization and OpenCode follow-up notes