MTPLX 2.9.1
Agent coding sessions run to completion: long-context crash fixes, no hidden output caps, reasoning preserved across turns, and a built-in flight recorder for diagnosing any session.
Engine
- Fixed: agent sessions could truncate and crash near 19,000 tokens (#310). The paged KV cache derived its capacity from a stompable claim instead of the pages it had actually allocated. Long coding sessions now run to the model's full advertised context.
- Fixed: shutdown segfault (#303). The daemon parks its model-owner thread and clears MLX streams at exit, so quit and restart are clean.
- Turbo profile truth. 2.9.0 shipped one turbo fast-path flag that was runtime-dead, so turbo did not apply its full intended configuration. The fast-path environment is now a single shared block,
/health reports exactly what the profile set, and a per-lane kernel selfcheck runs at startup. If you benchmarked turbo on 2.9.0, re-run it.
- Multi-turn cache reuse holds at scale. All encode paths now share one tokenization policy, so warm agent turns no longer hit cache walls at assistant reasoning boundaries; tool-call turns bank their just-generated output directly from live KV with no GPU recompute (follow-up turns restore the full prior context at exact length); interrupted background commits retry instead of silently giving up.
- The model no longer re-derives its own reasoning on long sessions. When a client echoes prior reasoning back, MTPLX renders it for turns its committed cache has not yet covered instead of an empty scaffold. In live sessions this ended a failure mode where one marathon turn re-thought a 57,000-token derivation from scratch.
- The model pack owns draft sampling. Stamped draft-sampler settings win over stale client-side pins, so speculative decoding runs the configuration each pack was tuned with.
Agent clients
The app and mtplx start now write identical client configurations for every supported coding agent, and mtplx doctor reports the truth about each lane.
- OpenCode: uncapped generation by default — the managed plugin strips exactly OpenCode's injected 32,000 output ceiling while explicit caps pass through untouched. Reasoning and reasoning-effort selection are honored end to end, prior reasoning round-trips across turns, and each session carries a stable cache identity.
- Pi: the reasoning-effort picker works and maps to the loaded model family's levels. The real output ceiling is advertised (Pi silently applies 16,384 when a model's metadata omits it), and a managed extension strips Pi's generated default cap and adds per-session cache identity.
- Hermes: requests now carry client identity and the configured reasoning effort (
agent.reasoning_effort), and the server strips Hermes's injected 65,536 default cap — Hermes cannot express "no cap" on its own. Explicit user caps are honored on every lane.
Flight recorder and mtplx trace
Every request now records a per-second flight log: tokens/sec, context growth, speculative acceptance by depth, verify/draft time split, prefill, and the final outcome — including cancelled and disconnected requests, which previously left no trace.
GET /v1/mtplx/flight answers "is it hung or thinking?" while a request runs: phase, live tok/s, acceptance, stall age, and the tail of the text being generated.
mtplx trace turns any coding session into a diagnosis: per-turn timelines joined to your OpenCode history, cache-reuse analysis, automatic pathology flags, repetition autopsies, and a self-contained HTML report per session.
- Recording is local-only JSONL under
~/.mtplx/metrics — a few MB per day of heavy use, capped at 256 MB by rotation. Set MTPLX_FLIGHT_RECORDER=off to disable it.
Updating
- App: Sparkle offers 2.9.1 automatically, or download the DMG at mtplx.com.
- CLI:
pip install -U mtplx or brew upgrade mtplx.