Pointing a chat UI at an Ollama or LM Studio model is easy. Making that model behave as an agent that edits your files and runs commands is where it gets messy, because open-weight models and different OpenAI-compatible servers are inconsistent about tool calling.
Short answer: JoeBro is a free, open-source Mac workspace for your AI agents. Point it at Ollama, LM Studio or any OpenAI-compatible server and, in agent mode, local models get the same tools as hosted ones (files, web, MCP servers, plugins) and the same shared memory. Local models (Ollama, LM Studio, anything OpenAI-compatible) and cloud models with your own keys run as agents with tools. This is a list of the specific failures I hit and what the Python backend (standard library only) does about each one.
Failure 1: arguments that aren't a JSON string
The OpenAI tool-call format says arguments is a JSON string. In practice some endpoints hand back an already-parsed object, and some models wrap the JSON in a markdown code fence. The parser accepts a dict as-is, strips a leading fence if there is one, tries json.loads, and never raises. The worst case is an empty dict.
Failure 2: silently truncated calls
When a reply hits max_tokens halfway through a tool call (typically a model rewriting a long file in one content argument), the arguments are non-empty but not valid JSON. If you parse that to {}, the tool fails with a misleading "requires path". So there is a separate check: arguments that are non-empty and don't parse mean "truncated", and the model gets told that, rather than a bogus missing-parameter error.
Failure 3: invented parameter names
Models invent parameter names. A document tool wants path, and one model sends file, another filepath, another file_name. Rather than dropping them, there is a small alias table: file, file_path, filename and friends all map to path; old_string and search map to find; new_text and replacement map to replace. It's unglamorous and it removes a whole class of failed turns.
Failure 4: tool calls written as text
Some models don't use the native tool-call channel at all and write the call into the reply as markup: <tool_call>, <function_call>, <invoke name=...><parameter ...>, or DeepSeek's DSML wrappers. A normaliser rewrites each of those into one internal form before execution. If tools were run from text after the model had already finished its turn, one extra completion is made with tools switched off: "Here are the results of the tool calls you just made, give your final answer now".
Failure 5: tool output that eats the context window
A single cat of a big file can fill a small local context. Each tool reply is clipped to 24,000 characters, keeping 70% from the head and 30% from the tail, with a note in the middle saying how much was cut and to narrow the request. The head of a file shows its shape and the tail of a log has the error; the middle is usually filler.
Failure 6: thinking models that burn the token budget
For some tasks I want thinking off. The switch isn't the same everywhere: OpenAI wants a minimal reasoning effort, Anthropic's extended thinking is opt-in, several hosted providers accept reasoning_effort: none, and Ollama reads a chat-template flag instead (chat_template_kwargs: {enable_thinking: false}). The request builder branches on the endpoint.
Safety: gating the dangerous tools
Agents that run commands get a permission step. When the app has "ask before running" on, a command waits for an explicit approve or deny (default deny, and a 3 minute timeout), and you can allow a tool for the rest of the session. Document edits can be gated the same way, before the file is touched.
The part that makes it useful
Because these agents sit in the same workspace as Claude Code, Codex and OpenCode, they share the same per-project memory over MCP and the same pool of tools, MCP servers and plugins. A local model can pick up a fact that Claude Code learned yesterday.
None of this is clever. It's the pile of small compatibility fixes you need before a local model is usable as an agent, and I'd be glad to hear which quirks you've hit that I haven't.
JoeBro is GPLv3 and free, and local first: chats and memory live in a SQLite file, with no account and no telemetry. One-line install (macOS 26+):
curl -fsSL https://joebro.pages.dev/install.sh | bash Code: https://github.com/joexk1/JoeBro . Short answers to common questions: https://joebro.pages.dev/faq/. A star helps other people find it.

