Entropic Roadmap

Master roadmap for the Entropic engine. This document is the source of truth for version targeting and feature scope.

Per-version design notes and implementation logs live in GitHub issues (gh issue view N) — the issue body is the proposal, its comments are the log, and roadmap entries reference gh#N. The pre-2026-05 files under .claude/proposals/{ACTIVE,STAGED,COMPLETE}/ are historical only; sections below written before that switch still cite them.


Current State (v2.14.5 on main)

  • C++20 engine, pure C ABI at every .so boundary

  • Unit + regression tests (CPU pre-commit gate), ThreadSanitizer preset for the concurrency scenarios

  • Model tests (developer-run, GPU recommended; results attached as a GitHub Release artifact at each x.y.0 bump)

  • Per-library coverage gates enforced via gcovr

  • Requirement traceability: docs/requirements.yaml catalog checked by the clew-guard pre-commit hook against the @req tags in source (from v2.14.6; was doxygen-guard + inv check-requirements)

  • Documentation site: the clew wiki, built by .github/workflows/docs.yml on each published release (from v2.14.6; replaces the doxygen site)

  • Single shared library librentropic.so plus entropic CLI binary plus pure-Python ctypes wrapper (pip install entropic-engine)

  • MCP servers built-in: filesystem, bash, git, web, diagnostics, entropic (delegate / pipeline / complete / diagnose / inspect / context_inspect)

  • External MCP plugins via stdio + SSE transports

  • Identity-based delegation, GBNF grammar constraints, prompt caching, constitutional validation with revision sub-loop

  • Per-session concurrency on one resident model (default on), named workspaces with per-workspace tool roots, opt-in delegation sandbox isolation, path-approval callback for outside-root file access

  • Speculative decoding (MTP) composing with prefill reuse; experimental expert-tensor offload for MoE tiers

  • Three consumer surfaces validated: tarball + find_package, pip wrapper, OpenAI-compat HTTP example

Status sections below: v1.7.x → v2.0.0 are SHIPPED. They are retained as the historical decision log — the “why” behind each design choice — not as in-flight work. The v2.1.0 section reflects what actually shipped (different from the original “Fine-Tuning Pipeline” plan, which moves to v2.2 candidate).

Gap notice (v2.3 → v2.12): this file was not maintained across those releases and they are not backfilled here. Their record is RELEASE_NOTES.md (last ten releases; older in OLD_NOTES.md), the per-version GitHub issues, and the design decision log at the bottom of docs/architecture-cpp.md. Only v2.13.0 below resumes the convention. Do not read the absence of a section as absence of work.


Planned releases (v2.14.6 → 3.0.0)

Each release is a GitHub milestone of the same name; the milestone is the authoritative issue list, this table is the overview. Patch releases run unit tests plus the targeted multi-turn model tests for loop/tool changes; minor releases run the full model gate (02:00–06:00 window).

Release

Scope

Issues

v2.14.6

clew 2.0.0 adoption (clew-guard replaces doxygen-guard and check_requirements; the clew wiki replaces the doxygen Pages site). Host robustness. After a nudged turn that already had prose, the forced retry may only call entropic.complete

#229, #214, #216, #217, #220

v2.14.7

Conversations persisted (resume_delegation has messages to load); dynamic identities reachable; VRAM-pressure hook fires; a missing required tool argument is an error the model sees; download verifies size; CPU thread settings; repeated re-delegation capped; two-handle CPU+GPU model test

#224, #225, #226, #222, #184, #228, #187, #235

v2.14.8

Delegation and config bugs: child todos, routed-lead overrides, completion-summary schema, configure refuses an unfinishable explicit_completion. install-engine checks files not a stamp; MTP head/trunk mismatch is a typed error; git tool timeout; KV state blob validated. Test integrity: coverage gate re-measures, gh#93 assertions can fail

#177, #185, #191, #213, #219, #221, #140, #146, #170, #176

v2.15.0

Full external MCP results (images, resources, structuredContent); per-session context usage + event; per-call grammar + JSON-schema → GBNF; delegation crash recovery

#227, #230, #231, #232

v2.16.0

Session-scoped pause/resume; hot reload of static identities and the constitution

#233, #234

v2.17.0

Latest MCP revision (2026-07-28): negotiation in the client and the bridge, older revisions still accepted until 3.0.0; client disconnect cancels its turn

#238, #218

v2.18.0

Performance and VRAM: release frees the device context, ubatch ladder under partial offload, partial-offload variance, expert-tensor offload, batched multi-session decode, placement query, incremental decode as baseline, gemma QAT partial-offload abort, MTP sweeps

#210, #196, #195, #180, #178, #223, #102, #139, #167, #147

3.0.0

Inference backend as a plugin boundary (see Deferred to 3.0.0); embedded runtimes; pipeline correction loop; image-generation output tier; drop pre-2026-07-28 MCP revisions

#215, #128, #43


v2.14.6 — one turn cannot take down the host (gh#214, gh#216, gh#217, gh#220, gh#229)

  • Inference wrappers return the typed error; UTF-8-safe tool history that cannot fail to serialize; exclusive release (#92). Follow-up gh#218.

  • clew 2.0.0: clew-guard replaces doxygen-guard and check_requirements (@dg_internal → @utility, @req floor 0.5); the clew wiki replaces the doxygen Pages site (gh#229).

v2.14.5 — failed turns are failures (gh#209, gh#212) (SHIPPED)

  • ENTROPIC_ERROR_TURN_FAILED; reason + unconfirmed text in last_error; failed turn rolled out of the session; turn-bounded answer selection that skips tool calls written as text (#91).

v2.14.4 — security hardening (gh#211) (SHIPPED)

  • git server: argv execution, -- before paths, option-shaped refs refused.

  • mcp.workspace_roots allowlist; fail-closed identities; [] = no tools; malformed YAML returns an error instead of aborting (#90).

v2.14.3 — the bridge release tool (SHIPPED)

  • <prefix>.release unloads every resident model over MCP; sessions kept; refused (retryable) mid-turn; reports what it released (#89).

v2.14.2 — concurrent streaming is safe (gh#208) (SHIPPED)

  • Per-run, thread-scoped stream sink replaces the handle-wide slot (#88).

  • Three bridge races found by a corrected TSan sweep: client-fd shutdown vs close, notification check-then-send, detached async workers (UAF).

v2.14.1 — declared servers per workspace; release without stopping serve (SHIPPED)

  • Declared mcp.external_servers launch in every workspace, rooted at its repository; ${ENTROPIC_WORKSPACE_ROOT} names that root in args/env (decision #87, revising #83). Unblocks sumac’s serve-based plugin.

  • Fix: external stdio servers now actually start in their server set’s root (working_dir was stored since v2.13.0 and never applied).

  • entropic serve: SIGUSR1 releases resident models and keeps serving (previously SIGUSR1 killed the host and left a stale token file).

v2.14.0 — one engine host, many clients (SHIPPED)

Tracking issue gh#206. Goal: one long-running host that every editor reaches at one URL, safe across many repositories and costing nothing while idle — so sumac can ship as a user-scope Claude Code plugin. Seven workstreams, branch per workstream, merged to develop:

WS

Issues

Landed

7 Hygiene

#186, #188, #197

facade tests rooted in temp dirs; decisions #81–82

3 Idle device

#198

deferred handle creates no device context

2 Discovery safety

#199, #200

Claude-Code-style enablement, fail closed; self-guard rebuilt (#83)

5 Multi-client safety

#171, #175, #172

external registry locked; bring-up timeout; bash honours per-run cancel

1 Serving

#204, #205

Streamable HTTP + bearer token, entropic serve, per-session lanes, ask tier/workspace (#84)

4 Tool contracts

#203, #173, #201, #202, #190, #174

outputSchema on every tool, generated Response format, contract gate (#85)

6 Per-workspace context

#179

setter + opt-in workspace_app_context file (#86)

Published at main 055d2a1: https://github.com/tvanfossen/entropic/releases/tag/v2.14.0 (gate 92/92).

Engagement tests: gh#204 multi-client HTTP (two sessions admitted after 0 ms while both turns in flight) and gh#179 concurrent per-workspace context.

v2.13.2 — the prefill term, and the lever auto was not using (SHIPPED)

Two fixes and one measurement, all downstream of the same blind spot: this project had never measured prefill.

gh#194 — generations[].prefill_tokens published 0. The engine counted prefill correctly and logged it; finalize_generation never copied it into the result, so every one of the four decode paths (plain, cancellable, streaming, streaming-cancellable) handed consumers a zero. It blocked a consumer outright, and it blocked us: a test assertion we wanted to convert from prose to fact had no fact to read.

gh#193 — the benchmark measured the half of the turn that was cheap. It timed warm decode over a short prompt. A real agentic turn is dominated by cold prefill over a large one — a consumer measured ~24k prefill tokens against ~4.7k generated in a single turn. A new arm sweeps residency against n_ubatch and reports both terms, cold.

What it found. Prefill and decode do not respond to the same lever, and the benchmark that reported only one of them recommended the wrong policy. Eight configurations, four iterations each, 26B-A4B at IQ2:

layers

n_ubatch

prefill tok/s

decode tok/s

30

128

619.3 ±4.9

44.2 ±0.3

28

256

657.8 ±4.9

25.9 ±2.7

24

128

345.9 ±7.9

15.1 ±3.1

24

256

522.0 ±12.4

15.6 ±2.1

24

512

682.3 ±7.7

12.5 ±2.8

17

128

227.3 ±7.6

9.2 ±2.2

17

512

512.6 ±7.6

7.8 ±3.1

17

1024

508.3 ±14.7

9.2 ±2.6

Read the fixed-layer rows, which is the only way to attribute anything: at 24 layers, n_ubatch 128→512 buys prefill 2.02× and costs decode 1.21×. At a fixed n_ubatch, dropping 30→24 layers costs prefill 1.79× and decode 2.93×. Both levers move prefill. Only residency moves decode.

So gpu_layers: auto now spends ubatch before it spends a layer — full residency at 512, then 256, then 128, and only then experts or layers. It stops at the first rung that fits rather than descending to the floor, only ever lowers, and names the reduction in the same log line as the placement.

The “or experts” in that sentence is unmeasured (gh#196). Every point in the table above pins cpu_moe_layers to zero, so the sweep compared ubatch against WHOLE LAYERS and never against experts. Experts are the cheaper axis (v2.13.0: 22.62 tok/s expert-offloaded against 18.86 whole-layer), so preferring ubatch over experts does not follow from this table and may be backwards. Separating them needs one axis held while the other moves.

The lever was there the whole time. The IQ2 arm reached a measurement in v2.13.1 only because a human hand-fed n_ubatch into the bench spec; at llama.cpp’s default 512 that model died at the compute buffer with its weights already loaded. Full residency was never out of reach — one number was.

And auto now states its margin. It accepts a placement that merely fits, and “fits” was all it reported. Real gate readings: 297 MiB free after placement against 10481-10618 MiB free at admission. (An earlier version of this entry quoted 15 MiB as a property of the card; that came from a test fixture constant, not a live placement.)

Shipped inert for the case it exists for — gh#196. The ladder only fires when full residency is reachable at some rung. Where the model cannot fit at 512, 256 or 128, the ubatch lever is discarded and experts/layers are priced at the original 512 compute buffer. Across the 89-test v2.13.2 gate, n_ubatch lowered to was logged ZERO times and all four real placements went to expert offload. Every test that covered the ladder called the solver with a hand-picked free-VRAM figure chosen so a lower rung reached full residency, so none of them could see it. A drift guard using the free-VRAM figure the gate actually reported now asserts which branch fires.

A second finding, not yet acted on: partial offload is not just slower, it is unpredictable. Fully resident, decode repeats within ±0.3 tok/s (0.7%). Partially offloaded, the same configuration swings ±2–3 tok/s — 20–28%, run to run, nothing changed. Predictability is a residency property and sits on no side of the ubatch trade.

Gate at 7fd49c1: 89/89 model tests, 0 failed, 0 skipped, 1 flaky on a GTX 1080 Ti; CPU 1934/1934; artifact version = built_version = 2.13.2. First fully green gate of the v2.13 line — and a draw from the prose-assertion distribution, not evidence that family is fixed.

Published at db53dbe: https://github.com/tvanfossen/entropic/releases/tag/v2.13.2 — 5 assets, both tarballs recovered by published sha256, and entropic install-engine into an isolated ENTROPIC_HOME reports entropic 2.13.2. The decode-variance finding went to gh#195 rather than shipping as a fix.


v2.13.1 — gpu_layers: auto reads the model instead of assuming it (SHIPPED)

auto exists so that fitting a new model is a decision the engine makes rather than a number an operator tunes. v2.13.0 shipped it deciding from almost no information: every model priced as thirty layers, file_bytes / layers charged per layer — folding in embeddings and the output head, which do not move with gpu_layers — and a flat 2 GiB reserved for everything that was not weights, double-counting the vram_reserve_mb the real estimator already honoured. It knew nothing about the KV cache, the draft head, or experts.

Measured cost, both directions: the 26B-A4B at IQ2 derived 26 of 30 layers for a configuration measured running at 30 of 30 with headroom to spare, and a 42-layer model was priced as if it had 30 — per-layer cost overstated by 40%, clipping a model that fits.

  • gguf_metadata.cpp reads shape from a metadata-only open (no_alloc), so a 10 GB model costs what a 1 GB one does: block_count, expert_count, and per-tensor sizes

  • Expert bytes are SUMMED from tensors matching llama.cpp’s own expert pattern — a measurement, not a fraction of a layer

  • auto solves the existing footprint estimator rather than approximating beside it, and the estimator can now price a PARTIAL offload exactly (it previously returned “unknown”, leaving the budget gate open for every partially-offloaded tier, gh#142)

  • For a MoE that does not fit, experts move host-side while ALL layers stay on the card, before any layer is dropped (gh#153 measured 22.62 tok/s that way against 18.86 for whole-layer offload of the same model)

  • The draft/MTP head is counted; compute-buffer headroom is held back scaled by n_ubatch, counted only as the excess over vram_reserve_mb

Three defects found while building it, all of which would have shipped: full residency must be reported as the -1 sentinel (a concrete count strips the mlock exemption and prices the model through the partial branch, under-counting); the compute allowance was itself a double-count against the reserve; and footprint_inputs_for re-priced a placement auto had just derived without knowing about the expert split, refusing a tier that fit — two estimators disagreeing about one tier, one call away from where the release removes exactly that.

Gate: 88/88 model tests passed, 0 skipped, 0 failed, 3 flaky, at b6edf33 on a GTX 1080 Ti; CPU 1933/1933; artifact version = built_version = 2.13.1.

One test in the suite was converted to get there, on measurement rather than on it being in the way. Five independent runs of the six tests that assert on model prose gave 1.00, 1.00, 1.00, 0.83, 0.50 and 0.18 — so there was no “family”, three were perfect, and the assertion COUNT predicted nothing. At 0.18 three retries reach ~45%, so a larger retry budget was never the lever; test-gh169-gh181-budget-carry was converted on the “prose triggers, fact decides” pattern and the other five were deliberately left alone.

Issues: gh#192. Filed alongside: gh#193 (the benchmark measures warm decode; real turns are cold-prefill dominated), gh#194 (generations[].prefill_tokens reads 0).

v2.13.0 — Multi-session hosting, workspaces, real delegation isolation (SHIPPED)

Nineteen issues plus a llama.cpp bump (b9886 → b11009). The unifying theme is contracts that were documented and never enforced: a delegation sandbox whose swap callback had no caller since v2.1.5, a max_turns argument advertised to the model that bound nothing, a bash timeout stored and ignored, a grammar stem that failed open. Each fix is the missing enforcement, not a softened claim — which is why this minor carries behavioural changes a consumer meets without editing config.

Concurrency and hosting

  • Per-session run guard, serialized decode, per-session interrupt; concurrent_sessions defaults true (gh#158)

  • entropic_interrupt_session, entropic_session_context_set — a session can now be restored, not just read (gh#158, gh#165)

  • Named workspaces: entropic_workspace_create, entropic_session_bind_workspace, per-workspace tool roots and server instances — one handle serves several repositories (gh#166)

  • Session-scoped built-in server state (read-before-write tracker, todo list) — the shared versions corrupted the heap under load (gh#158)

Delegation

  • delegation.isolation: none|sandbox (default none), actually wired, unique sibling ids, restore to the parent’s active root (gh#160)

  • Explicit context seeds, requires_context tiers, resume-by-target (gh#162)

  • Iteration cap and thinking-budget hard cut annotate the child’s real output instead of replacing it with a placeholder (gh#169, gh#181)

  • entropic.delegate’s max_turns binds the child; operator limit wins on conflict (gh#182)

  • Identity frontmatter overrides reach a named top-level tier, not only delegated children (gh#183; routed leads remain open as gh#185)

Residency and performance

  • Load once into the target residency; refuse unsafe use_mlock / gpu_layers with ENTROPIC_ERROR_MLOCK_LIMIT_EXCEEDED (gh#148)

  • models.defer_load — opt-in deferred load through the residency gate, which the eager path had been bypassing (gh#157)

  • entropic_release_model — evict weights, keep the handle, sessions and adapter registrations (gh#164)

  • Experimental cpu_moe_layers expert-tensor offload, default off (gh#153, productionization tracked by gh#180)

  • Pruned and explicitly bounded gitignore walk; filesystem.max_walk_entries (gh#161)

  • MTP measured on a four-arm matrix with a same-config floor: +42.8 % / +46.7 % fully resident, ~0 % partially resident despite a higher accept rate (gh#153)

Safety and correctness

  • mcp.filesystem.allow_outside_root becomes tri-state, default optional, routed to entropic_set_path_approval_callback; refused when no approver is registered

  • mcp.bash.timeout_seconds enforced, process group killed

  • Unresolvable tier grammar: stems fail loud; per-generation metric records carry the resolved grammar source (gh#154)

  • A prompt that cannot fit its tier context is refused (ENTROPIC_ERROR_EVAL_CONTEXT_FULL) instead of degrading silently

  • Unreadable prompt paths rejected before the model loads (gh#156)

  • PRE_TOOL_CALL’s modified_json is applied, not freed (gh#168)

  • Bare tool-call turns are no longer logged as reasoning faults (gh#159)

  • Model-test skips state their real reason (gh#149)

Gate: 86/87 model tests passed, 0 skipped, 1 failed, 2 flaky, at f64dfb2 on a GTX 1080 Ti; CPU suite 1925/1925; TSan 36/36 with zero warnings. Audit record attached to the release as model-results-v2.13.0.json, which from this release also carries built_version — what the tested build held, as opposed to what the tree claimed.

The one failure is test-outside-root-approval, on one assertion of 15: the lead never issued the second of two requested reads, so the path approver was never consulted about it. The other 14 verify the feature. It belongs to a class of assertions that only became real this release — a test helper used to return the whole conversation, so an assertion could match the test’s own seed and pass while the model said nothing — and which a small lead now satisfies about two times in three.

Measured late: the [mtp-a4b-iq2] bench arm runs when invoked as the sole arm in its process; what exceeds an 11 GiB card is several arms sharing one (gh#167, gh#180). Fully resident it gives 52.46 → 61.05 tok/s, MTP +16.33 % against a 0.02 % floor — against 18.86 tok/s and no measurable MTP gain for the same model at Q4 with 18 of 30 layers. On this hardware class, making the model fit beats placing it well by 2.8×.

gh#163 was investigated and reproduced no defect; evidence tests shipped.

Issues: gh#148, gh#149, gh#153, gh#154, gh#156, gh#157, gh#158, gh#159, gh#160, gh#161, gh#162, gh#164, gh#165, gh#166, gh#168, gh#169, gh#181, gh#182, gh#183.

Design decisions #60–#80 in docs/architecture-cpp.md. Consumer-facing detail in RELEASE_NOTES.md.


v1.7.2 — TUI Separation

Extract the TUI into a standalone consumer repo (entropic-tui).

  • TUI becomes an external dependency on entropic-engine

  • Engine repo has no TUI imports or TUI-specific code paths

  • Validates the engine’s public API surface (identifies gaps)

  • CLI commands (benchmark, download, init, setup-cuda) stay in engine

  • TUI locked to v1.7.1 engine initially, tracks releases through 1.8.x

v1.7.3 — Engine API Cleanup

Post-TUI-separation cleanup.

  • Remove TUI-specific code from app.py

  • Headless engine entry point only

  • Stabilize LibraryConfig for external consumers

  • Document public vs internal API boundaries

  • Deprecation warnings on any internal APIs used externally


v1.8.x — C++ Engine Port

Faithful translation of the Python engine to C++. No new features — port what exists, validate parity. Each subsystem is independently verifiable.

v1.8.0 — C++ Project Scaffold

  • CMake project structure (src/, include/, tests/)

  • llama.cpp as git submodule (direct linkage, no wrapper)

  • Public C API header design (entropic.h) — interface sketch

  • Build system: CUDA detection, platform support

  • CI pipeline: GitHub Actions for CPU builds, lint, static analysis

  • Test framework selected (Catch2 or GoogleTest — BDD-style preferred)

  • spdlog structured logging from day one (all subsequent versions use it)

  • Error types: entropic_error_t enum, entropic_last_error(), entropic_error_callback_t — defined in librentropic-types

  • Doxygen setup with heavy commenting standard

  • Concrete base class patterns established (C++ equivalent of Python ABCs)

  • Expose llama.cpp config pass-through fields in schema: cache_type_k, cache_type_v, n_batch, n_threads, tensor_split, flash_attn, reasoning_budget

v1.8.1 — Config + Prompts

  • YAML config loader (ryml — single-header amalgamation via ryml_all.hpp)

  • Config schema validation layer (replaces Pydantic validators, built in-house)

    • Cross-field validation: routing references, default tier, threshold ordering

    • Layered config merge: defaults → global YAML → project YAML → env vars

  • Prompt manager (YAML frontmatter parsing, identity loading)

  • Constitution and app_context loading

  • BundledModels registry (path resolution from keys)

  • Bundled data file discovery: compile-time DATA_DIR define, overridable at runtime via config_dir field

  • Unit tests for config loading + prompt parsing + validation

v1.8.2 — Inference Backend

  • InferenceBackend concrete base class

  • LlamaCppBackend — model load, generate, generate_streaming, complete (direct C API)

  • complete() — raw text completion without chat template (router needs this)

  • VRAM lifecycle state machine (COLD/WARM/ACTIVE)

  • Chat adapter base class + Qwen35 adapter

  • reasoning_budget exposed as PhaseConfig inference parameter

  • KV cache quantization (cache_type_k, cache_type_v) as config fields

  • Generation config: temperature, top_p/k, repeat_penalty, max_tokens

  • Design interfaces to be architecture-agnostic (transformer, GDN/recurrent)

  • Benchmark: tok/s parity with Python engine

v1.8.3 — Host-Memory Prompt Caching

  • KV cache prefix save/load caching layer built on llama_state_seq_get_data / llama_state_seq_set_data

  • Cache identity/constitution/tool prefixes in host RAM

  • Hot-swap cached prefixes on role/identity change

  • Validates task #51 (KV cache prefix injection) via native mechanism

  • Configurable RAM limit for prompt cache

v1.8.4 — Engine Loop

  • AgentEngine (agentic loop, state machine)

  • ResponseGenerator (system prompt assembly, tier-filtered tools)

  • ContextManager (message list, anchors, compaction trigger)

  • DirectiveProcessor (typed directives from tool results)

  • Interrupt/pause (thread-safe)

  • Loop config (max_iterations, max_consecutive_errors, max_tool_calls_per_turn)

  • Metrics collection (per-loop timing, token counts)

  • Headless test: prompt in → response out

v1.8.5 — Tool System

  • MCPServerBase concrete base class

  • ToolRegistry + ToolExecutor

  • PermissionManager (allow/deny, glob patterns)

  • Built-in servers: filesystem, bash, git, diagnostics, web, entropic

  • MCPServerBase / ServerResponse supports optional ContextAnchor on tool results — base class infrastructure, not per-tool special case. Tools that return replaceable content declare an anchor key strategy; the base class emits the directive automatically. Tools with no anchor strategy behave as before (append to context).

  • Filesystem read_file uses this: anchor keyed by file path (e.g., key="file:src/engine.cpp"). Subsequent reads of the same file REPLACE the anchor instead of appending. Other tools (git.status, diagnostics) can adopt the same pattern later without new infrastructure.

  • LSP client embedded in diagnostics (diagnostic diffs in write/edit responses)

  • Duplicate detection + error feedback (circuit breaker)

  • Investigate llama.cpp autoparser for tool call parsing

    • If viable: simplify adapter parsing, reduce GBNF dependency for tool calls

    • If not: port existing adapter XML/JSON parsing

  • Tool-calling loop test: generate → parse → execute → generate

v1.8.6 — Delegation + Identity

  • DelegationManager (child loops, worktree isolation)

  • Pipeline execution (multi-stage sequential, shared worktree)

  • Identity system (allowed_tools filtering, phases, PhaseConfig)

  • TodoTool (child), delegate/pipeline/complete tools (lead)

  • Auto-chain (depth 0 → lead, depth > 0 → complete)

  • Pipeline scope enforcement (“stay within your role”)

  • Delegation test: lead → eng → qa pipeline end to end

v1.8.7 — External MCP

  • External MCP server support (stdio/SSE transport)

  • .mcp.json discovery (project + global)

  • Runtime MCP registration/deregistration

  • Server health detection + configurable reconnection with backoff

  • Dynamic tool registration refresh (server declares new tools mid-session)

  • Tool call routing to disconnected servers returns structured error

v1.8.8 — Session Persistence

  • SQLite conversation persistence

  • Session log files (session.log, model.log equivalents)

  • Delegation storage (parent/child conversation IDs)

  • Permission persistence (save_permission)

  • Note: spdlog structured logging established in v1.8.0 — this version adds file-based session persistence and log rotation only

v1.8.9 — C API Stabilization

  • entropic.h finalized

  • Engine lifecycle: create, configure, run, interrupt, destroy

  • Tool registration: register_tool, register_server

  • Identity management: load_identity, get_identity

  • Hook registration: register_hook

  • Error handling contract finalized (error codes + callbacks, defined in v1.8.0)

  • Thread safety guarantees documented

  • API versioning scheme (semver on C API)

  • Compile + link from external project verified


v1.9.0 — Python Engine Deprecated

  • Auto-generated Python wrapper (ctypes/cffi from entropic.h)

    • Generation script in CMake build, always in sync with C API

    • No manual wrapper maintenance

  • CLI commands ported to use C engine via wrapper

  • Benchmark runner ported to use C engine

  • Python engine code marked deprecated

  • Model tests passing against C engine

v1.9.1 — Hook Architecture

  • HookRegistry (pre/post at every stage transition)

  • Model lifecycle: on_model_load, on_model_unload, on_adapter_swap, on_vram_pressure

  • Generation: on_pre_generate, on_stream_token, on_post_generate

  • Context: on_context_assemble, on_pre_compact, on_post_compact

  • Tool: on_pre_tool_call, on_post_tool_call, on_permission_check

  • Directives: on_directive, on_custom_directive

  • Agentic loop: on_loop_start, on_loop_iteration, on_loop_end, on_state_change

  • Delegation: on_delegate, on_delegate_complete

  • Error: on_error

  • Pre-hooks can modify or cancel. Post-hooks inspect and transform.

  • Failing hooks logged and skipped — never crash the engine.

v1.9.2 — LoRA Adapter Hot-Swapping

  • Load base model once, swap LoRA adapters without unloading

  • Adapter lifecycle: load, unload, swap

  • Multiple adapters warm in RAM, one active on GPU (mirrors COLD/WARM/ACTIVE)

  • Adapter metadata accessible for routing

  • Tier config supports adapter_path

  • Target swap latency: ~50-200ms

v1.9.3 — Grammar Registry + Per-Generation Override

  • GrammarRegistry — named grammars loadable by key

  • Runtime grammar loading without restart

  • Per-generation grammar override (same model, different grammar per call)

  • Dynamic grammar from in-memory GBNF string (not just file paths)

  • Grammar validation API

  • One model’s output can define grammar constraints for another’s generation

v1.9.4 — Per-Caller MCP Authorization

  • Per-identity MCP access control with runtime-grantable keys

  • Each identity has a discrete set of authorized MCP keys

  • READ/WRITE access levels per tool

  • Grantable/revocable at runtime via API (one caller grants keys to another)

  • Key sets serializable

  • Engine enforces boundaries — caller cannot invoke tools outside its key set

v1.9.5 — Structured Audit Log

  • Complete JSONL log of all MCP tool calls

  • Fields: timestamp, caller_id, tool_name, params, result, directives

  • Appendable per session

  • Replay API: replay_log(path) re-executes tool call sequence

  • Filtering by caller_id, tool_name, time range

v1.9.6 — Dynamic Identity/Tier Creation

  • Create, configure, destroy identities at runtime (not just static config)

  • API: create_identity(name, system_prompt, grammar_id, mcp_keys, adapter_path?)

  • update_identity(...), destroy_identity(...)

  • Created identities participate in tier routing

  • Bounded by configurable max_identities

v1.9.7 — Time-Based Generation Cap + GPU Resource Profiles

  • Per-tier wall-clock time cap alongside token limits

  • Throughput tracking, auto-adapting generation length across hardware

  • GPU resource profiles: n_batch, n_threads knobs exposed

  • Profiles: maximum, balanced, background, minimal

v1.9.8 — Constitutional Validation Pipeline

  • Post-generation grammar-constrained critique pass

  • Structured JSON output evaluating constitutional compliance

  • Revision loop: if violations found, re-generate with feedback

  • Configurable: which identities get validation, which rules apply

  • Consumer can disable for latency-sensitive use cases

v1.9.9 — Compaction Hooks

  • Compaction invokable programmatically per identity context

  • Pre/post compaction callbacks

  • Consumer can register custom compactor replacing or wrapping default

  • Default summarization remains fallback

v1.9.10 — Perplexity / Log-Probability Evaluation API

  • Evaluate arbitrary token sequences against loaded model

  • compute_perplexity(model_id, tokens), get_logprobs(model_id, tokens)

  • Return per-token log-probabilities without generating

  • Evaluation-only, no KV cache mutation

  • Works on any ACTIVE model

v1.9.11 — Vision / Multimodal Support

  • Multimodal message support via content arrays (text + image)

  • mmproj loading for vision-capable models (Qwen3.5 mmproj files)

  • Backward-compatible text-only fallback

  • Image preprocessing pipeline

  • Adapter support for vision content formatting

v1.9.12 — Diagnose + Self-Inspection

  • Engine introspection tool: model can read its own configuration, loaded identities, tool definitions, and recent action history

  • Doxygen-generated documentation accessible for architecture understanding

  • /diagnose command: model self-reflects on previous actions, identifies reasoning errors, flags potential engine-related root causes

  • Exposed as an entropic internal tool

v1.9.13 — Backend Abstraction

  • InferenceBackend interface finalized for future backends

  • LlamaCppBackend as reference implementation

  • Interface designed for:

    • GDN/recurrent architectures (Falcon-H1 family)

      • GDN CUDA/Vulkan/Metal kernels merged in llama.cpp

      • https://github.com/ggml-org/llama.cpp/pull/20340

    • NPU backends (Axera AX630C via Pulsar2/AXCL)

    • Multi-sequence/batched inference (foundation for 3.0.0 fan-out)

  • Architecture-agnostic capability queries

v1.9.14 — Hardening

  • Stress testing (long sessions, context pressure, rapid interrupts)

  • Memory leak analysis (valgrind, AddressSanitizer)

  • Edge cases: malformed tool calls, model crashes, OOM recovery

  • Concurrent access patterns verified

  • Performance regression tests vs Python engine

v1.9.15 — Migration Cleanup

  • Remove deprecated Python engine code

  • entropic-engine PyPI package ships C library + auto-generated Python wrapper

  • CLI fully functional from C engine

  • examples/ ported to C engine API (hello-world, pychess)

  • README updated for 2.0.0 architecture


v1.10.0 — Test Architecture Revamp

  • Test framework already selected in v1.8.0 (Catch2 or GoogleTest, BDD-style)

  • Conventional test mapping: test files mirror source structure

  • Doxygen-driven enhancement: parse annotations to map tests to API functions

  • Git diff integration: select relevant tests based on changed files

  • CI pipeline: GitHub Actions for unit/API tests (CPU)

  • Model tests remain developer-run with checked-in reports

  • Manual integration tests (test1-test6 style) remain manual

v1.10.1 — Test Maturity

  • Coverage targets established

  • Regression suite from manual test findings (test1-test6 patterns)

  • CI gates: no merge without passing tests

  • Release readiness checklist

v1.10.2 — C++ Model Test Suite

  • 10 BDD vertical-slice tests: generation, tool parsing, routing, delegation, grammar, compaction, logprob evaluation, dynamic identity routing, GPU profile constrained generation, MCP authorization denial

  • 2 deferred tests (LoRA swap — no adapter fixture, constitutional — v1.9.8 wiring incomplete)

  • GPU recommended (CPU works but is impractically slow), developer-run, results checked into test-reports/model/results.json

  • CI staleness gate: version + git_sha freshness check, fails if stale or missing

  • Target runtime under 5 minutes on reference hardware

  • Interactive — thresholds and assertions tuned hands-on with actual model

  • VRAM monitoring between tests, filesystem sandbox for tool tests

v1.10.3 — Doxygen Traceability & Full Documentation Review

  • Complete review and implementation of latest doxygen-guard revision

  • Full documentation review: every function in the codebase, not just public API

  • @req REQ-xxx tags on all public functions (entropic.h + interfaces)

  • scripts/select_tests.py — mirror-path + doxygen-guard impact test selection

  • CI pipeline: PR builds use test selection, push runs full suite

  • Depends on: doxygen-guard stable release

v1.10.4 — Engine Observability

  • Rich INFO-level logging across all subsystems: generation results, routing decisions, grammar enforcement, profile application, identity lifecycle, MCP authorization decisions, compaction triggers, throughput

  • Wire ThroughputTracker to GenerationResult (currently dead code)

  • Wire entropic_throughput_tok_per_sec() facade stub

  • Validation: v1.10.2 model test logs must tell complete diagnostic story from engine-emitted logging alone, with zero test-added logging


v2.0.0 — Release

  • License: Apache-2.0 (v2.0.0–v2.2.1 shipped under LGPL-3.0-or-later with a linking exception; v2.2.2 returns to Apache-2.0)

    • Prior Apache 2.0 releases remain Apache 2.0 (irrevocable)

    • LGPL releases v2.0.0–v2.2.1 remain under LGPL (irrevocable)

    • DCO sign-off required for external contributors

  • Stable C API (entropic.h, versioned)

  • Three distribution channels:

    1. PyPI wheel with bundled .so (CUDA, purpose-built)

    2. apt/deb package for C++ consumers (game engine, embedded)

    3. Source build from git clone (static linking)

  • Auto-generated Python wrapper

  • Doxygen API reference published

  • Benchmark results published (perf + quality)

  • examples/ fully ported and validated against C engine

  • GitHub release + PyPI publish

Post-2.0.0 (not blocking release):

  • entropic-tui ported to C engine Python wrapper (separate repo, own timeline)


v2.0.x — Post-2.0.0 Hardening (SHIPPED)

Iterative hardening on top of the v2.0.0 release. Each minor patch absorbs a focused proposal:

  • v2.0.1 Developer onboarding: contributing.md, getting-started flow, build presets matrix.

  • v2.0.2 Doxygen traceability: every public function carries @req, @version, exemption tags; doxygen-guard pre-commit hook enforces.

  • v2.0.3 MCP bridge: entropic mcp-bridge subcommand exposes the engine as an MCP server over stdio so Claude Code / VSCode / other tool-protocol clients can use it without code.

  • v2.0.4 Entropic explorer example.

  • v2.0.5 Distribution: tarball layout, install rules, find_package(entropic) consumer experience, GitHub Release flow.

  • v2.0.6 Multi-rc series of demo-driven hardenings (rc16–rc19): external bridge multi-client subscriptions, validator verdict + critique tier, ON_COMPLETE validation hook, identity caps, synthetic-termination plumbing, relay log disambiguation, PRE/POST_TOOL_CALL hook firing, typed result_kind.

v2.1.0 — Formal Release Bundle (SHIPPED)

Bundles four streams of work into the first formally-tagged minor:

  • A1–A5: Engine bug bundle — six verified bugs from the demo session, scoped down from ten reports after independent verification (E1 dead frontmatter fields removed, E2 budget-exhausted children validated-and-relayed, E5+E6 phase observer generation counter, E8 tasks_for_cancel lock contract, E9 broadcast head-of-line elimination).

  • B1–B6: Release infrastructure — CI/CD rescoped to free hosted runners, RELEASING.md manual flow, Python wrapper (playwright pattern), OpenAI-compat HTTP example, getting-started guide, version sync to 2.1.0, unified proposal consolidating four absorbed asks.

  • A6–A10 + #44–#46: Engine signal honesty (demo asks): UTF-8 facade sanitization (#47), iteration count exposure (#41), validation rule visibility on retry (#42), tier-scoped assembled-prompt inspection (#43), empty-vs-failed tool result classification + tightened error detection (#44), anti-spiral primitive (#45), tool result preview length cap (#46).

  • C1–C6: Pre-release cleanup — Python-era dead code removed, test-reports relocated under build/, scripts/→inv tasks, pyproject.toml [tool.*] stripped (pre-commit owns hooks).

The original “Fine-Tuning Pipeline” plan that previously occupied this slot was de-prioritised in favour of release-readiness work and moves to v2.3 candidate (below).


v2.2.0 — Multimodal Foundation + Adapter & Model Expansion (ready for release)

All six patches in the bundle (v2.1.7 → v2.1.12) landed on develop. The v2.2.0 milestone tag is queued for maintainer execution: model-test JSON capture, develop → main merge, inv release-check, and gh release create. See RELEASE_NOTES.md for the consolidated entry and docs/releasing.md for the maintainer workflow.

The bundle was planned as four patch releases bundling together at the milestone tag; the actual sequence grew by two (v2.1.7 closed pre-bundle, v2.1.12 added to absorb consumer-reported fixes that surfaced during implementation). Each patch shipped internally coherent.

Strictly additive at the C ABI: new symbols, new config keys, new bundled-model entries. No removals, no behavioural changes to existing 2.1.x consumers. Patch sequence preserves backwards compatibility at every step.

v2.1.8 — Multimodal foundation

Close the facade-layer gap that drops content_parts before the backend sees them (v1.9.11 shipped vision at the inference layer, but entropic_run accepts only a flat string).

  • New facade ABI: entropic_run_messages / _run_messages_streaming (two parallel paths — entropic_run preserved unchanged).

  • mmproj per-tier routing — orchestrator picks a vision-capable tier when image parts arrive; tier capabilities config field added.

  • Bundled VLM tier — Qwen2.5-VL-7B-Instruct (or Qwen3.x-VL successor if released by implementation time).

  • OpenAI server example accepts data: URL / file:// / absolute paths; http(s):// returns 400 (SSRF surface).

  • Ride-along: entropic_context_usage(handle, *used, *capacity) — two-scalar getter for the gauge consumers want.

Issues: gh#37, gh#38, gh#39, gh#41, gh#42.

Proposal pointer: .claude/proposals/BACKLOG/v2.1.8-multimodal-foundation.md.

v2.1.9 — Model registry expansion + 3 new adapter classes

Broaden the bundled-model registry from 2 entries to 11. Each generation gets its own adapter class — no version lumping.

  • Naming convention <family>_<size_or_variant> documented in data/bundled_models.yaml.

  • 9 new registry entries: Qwen3.5 siblings (0.8B / 2B / 4B / 9B), Qwen3.6-A3B, Gemma 4 (26B-A4B / E4B / E2B), Nemotron-3-Nano-4B.

  • Qwen36Adapter, Gemma4Adapter, Nemotron3Adapter — distinct classes, registered under keys qwen36 / gemma4 / nemotron3.

  • Nemotron adapter gated on architecture verification (hybrid-Mamba vs. pure Transformer; chat template; tool-call format; reasoning trace handling).

  • Unit tests per adapter (render + tool-call parse + multi-turn) and model tests per bundled GGUF (load + first-token smoke + tool-call fixture).

Issues: gh#44, gh#45, gh#46, gh#47; ratchets gh#17.

Proposal pointer: .claude/proposals/BACKLOG/v2.1.9-model-registry-and-adapters.md.

v2.1.10 — Mid-generation user message queue

UX feature for long-thinking interactive sessions. Today consumers must either interrupt (destroys in-flight investigation) or wait (kills momentum). This patch adds a third path: enqueue follow-up messages that the engine consumes at the next clean turn boundary.

  • New ABI: entropic_queue_user_message, entropic_user_message_queue_depth, entropic_clear_user_message_queue.

  • Injection boundary: top-level AgentState::COMPLETE only — not parent-resume-after-child (avoids parent-context corruption).

  • Queue bounded (default cap 8); streaming protocol unchanged (callbacks fire only for the active turn).

Issue: gh#40.

Proposal pointer: .claude/proposals/BACKLOG/v2.1.10-mid-gen-message-queue.md.

v2.1.11 — Speculative decoding + SecondaryModelLoader

Speculative decoding was previously listed under “Deferred to 3.0.0” with the rationale “blocked by single-GPU VRAM constraint.” That rationale is invalidated by CPU-led-draft as the default placement — the GPU stays saturated verifying, CPU headroom does the drafting, no VRAM competition with the primary.

  • SecondaryModelLoader (gh#27) — unified lifecycle for router / draft / future thinking-model slots.

  • Speculative decoding (gh#36) decoupled from the router model — routing.model and inference.speculative.draft_model are independent config keys.

  • Draft placement is a config axis (draft_n_gpu_layers): CPU default, GPU optional when VRAM allows, hybrid offload supported.

  • Draft pairing is tokenizer compatibility (checked via common_speculative_is_compat), not same-family.

  • Draft model: Qwen3.5 small variant (NOT Qwen3-0.6B — different generation, tokenizer mismatch likely); specific size picked from the v2.1.9 registry.

  • No llama.cpp pin bump required — current pin already exposes common_speculative_* surface.

  • Token-stream protocol unchanged (callbacks fire once per accepted token, not per proposed).

  • Off by default; opt-in via config.

Issues: gh#27, gh#36.

Proposal pointer: .claude/proposals/BACKLOG/v2.1.11-speculative-decoding.md.

v2.2.0 — milestone tag

Cut after v2.1.11 lands. No new code; release notes consolidation and the model-test results JSON attached as a Release artifact per the project’s release process.

v2.2.1 — Wrapper sync + auto-generated bindings

Closes gh#54 and gh#55 mechanically.

  • scripts/gen_bindings.py — full-fidelity bracket-aware C declaration parser, replaces the partial regex generator.

  • All 86 ENTROPIC_EXPORT functions, 8 typedef enums, 3 ctypes structures, and every named callback typedef auto-generated.

  • python/src/entropic/_bindings.py + _bindings_manifest.py become generated artifacts (excluded from ruff-format / flake8).

  • _LAZY_EXPORTS imported from _bindings_manifest instead of a hand-curated literal.

  • Pre-commit hook gen-bindings-check re-runs the generator and diffs against committed output — drift = exit 1.

  • Self-test in tests/unit/test_gen_bindings.py synthesizes a fake export to verify the generator catches it.

v2.2.2 — License return to Apache-2.0

Relicense-only patch. LICENSE replaced with canonical Apache-2.0, NOTICE trimmed, ~400 source/test/build files have their SPDX-License-Identifier headers flipped. No code, ABI, or behavioral changes. v2.0.0–v2.2.1 remain under LGPL-3.0-or-later with the linking exception they originally shipped under.

v2.2.3 — UTF-8-safe history truncation

Closes gh#56.

Bugfix for the state-provider history preview in src/facade/entropic.cpp:1070. The byte-indexed substr(0, 200) truncation slices through multi-byte UTF-8 codepoints in any message with non-ASCII content near the 200-byte boundary, producing an invalid sequence at the seam. The subsequent arr.dump() throws nlohmann::json::type_error.316 and run_streaming returns ENTROPIC_ERROR_GENERATE_FAILED — model output is lost.

  • New local helper utf8_safe_substr walks back over UTF-8 continuation bytes (0x80..0xBF) before the cut, guaranteeing the returned prefix is always a valid UTF-8 sequence.

  • sp_get_history body bumped to use the helper.

  • Unit test: pushes "a"*199 + "é"*5 into history, calls the state provider, asserts json::parse(result).is_array().

No ABI changes. Strictly behavioral repair.

Proposal + implementation log: gh#56.

v2.2.4 — VRAM-aware tier model lifecycle (intent restoration)

Closes gh#57.

Bugfix framing: the engine’s current eager-load-everything behavior at configure_dir time is a mistranslation of the original design intent. The engine is supposed to abstract memory distribution — consumers declare per-tier model bindings, and the engine decides what, when, and where to load/unload based on its own VRAM accounting. Consumers should never see ENTROPIC_ERROR_LOAD_FAILED for an aggregate-fit problem the engine should be resolving internally. v2.2.4 restores that intent.

Extends the v1.8.2 VRAM lifecycle state machine (COLD/WARM/ACTIVE) with observable residency-set state + a budget-aware admission gate. Single-active swap is retained as the LRU-of-size-1 default; the residency-set data structures and observer surface are sized for the multi-resident follow-up.

Engine-owned mechanics (shipped in v2.2.4):

  • Per-model footprint accounting (GGUF weights file size + context_length × per-token KV estimate + configured vram_reserve_mb headroom).

  • VRAM budget cached at initialize() from ENTROPIC_VRAM_BUDGET_BYTES env var. When set and a single tier’s footprint exceeds it, get_model refuses with ENTROPIC_ERROR_TIER_MODEL_TOO_LARGE instead of attempting a load that would surface late as ENTROPIC_ERROR_LOAD_FAILED. When unset, the gate is disabled and behavior matches v2.2.3.

  • Residency-set state in ModelOrchestrator: per-tier footprint cache + per-tier last-activation timestamp for LRU recency.

  • Residency observer fires on every Loaded / Evicted / ActivationSwap transition. INFO-logged with full state-after, no truncation.

  • configure_dir is already lazy at the orchestrator level — only the default tier activates at init; alternate tiers load on first routing/lock through the (now residency-gated) get_model.

Deferred to follow-up patches (data structures + ABI already in place — no further ABI bump required):

  • CUDA cudaMemGetInfo budget discovery (env var is the supported override today; Metal / ROCm equivalents carry the same 0 = unknown semantics by construction).

  • Multi-resident coexistence when total footprint fits the budget (current path remains single-active swap).

  • Metrics counter/histogram sink wiring — INFO logs carry the fields; per decision 94 (gh#26, 2026-11-23) they are the metrics surface, and no registry is planned.

New ABI surface (strictly additive):

  • ENTROPIC_ERROR_TIER_MODEL_TOO_LARGE — distinct from OUT_OF_MEMORY / LOAD_FAILED. Single tier’s model alone exceeds total VRAM; eviction won’t help; consumer needs to swap registry selection.

  • entropic_residency_snapshot(handle, char** out_json) — current residency set + footprints + last-activation timestamps + headroom.

  • entropic_set_residency_observer(handle, cb, ud) — callback fires on loaded, evicted, activation_swap events.

  • State-provider extension sp_get_residency — engine introspection via the same surface as sp_get_history.

Observability:

  • INFO log on every load/evict/swap with model path + footprint + residency-set state-after. Untruncated per project standards.

  • ERROR log on TIER_MODEL_TOO_LARGE with full context.

  • Metrics: counters for model_loads_total, model_evictions_total, tier_activation_swaps_total; histograms for model_load_seconds, model_evict_seconds. Superseded by decision 94 (gh#26): these are INFO log fields, not registry counters.

Out of scope (potential v2.3.x):

  • Cross-handle model sharing (multiple engine instances).

  • Disk-cached weight prefetching.

  • Quantization-on-load.

  • Smarter eviction policies (size-aware, recency+frequency hybrids).

  • Multi-GPU residency placement.

Proposal + implementation log: gh#57.

Tracked but not in v2.2.0

  • gh#35 — engine idle-exit policy. Deferred until a headless entropic serve host is on the roadmap; the bridge fix in v2.1.7 removed the acute orphan-VRAM source.

  • gh#43 — image-generation / image-edit models (Qwen-Image, Qwen-Image-Edit). Future feature with a distinct ABI; not a vision-language model.

  • gh#17 remaining adapter families — Llama 3.x, Gemma 2/3, Mistral / Mixtral, Phi-3 / Phi-4, DeepSeek, Granite, Command-R. Ratchets through 2.3.x.


v2.1.7 — mcp-bridge becomes a pure relay

Architecture fix for gh#34.

entropic mcp-bridge historically spawned a full standalone engine (model load, ~13–15 GB VRAM) every time an external MCP client (Claude Code, IDE plugins) connected, even when a consumer engine was already running for the same project. The name “bridge” implies a thin relay; the implementation was a hidden second server. Consumers OOM’d their GPUs on what looked like a no-op connection.

v2.1.7 makes the bridge match its name:

  • mcp-bridge is a pure stdio↔unix-socket relay. It never calls entropic_create, owns no model, and exits fast when no engine is reachable. mcp-connect is absorbed and removed.

  • Engine hosts (TUI, consumer apps, future headless server) remain the sole owners of the model and the unix socket. The bridge sits in front of them identically.

  • Unix-socket hardening: SO_PEERCRED UID check on accept, socks/ dir mode 0700, socket mode 0600, symlink-safe bind. Session token was considered and dropped — same-uid attackers can read it, cross-uid attackers can’t reach the socket; no security delta.

  • Loud diagnostic logging on both sides naming canonical project_dir, hash, and computed socket path, so the silent-misroute failure mode is diagnosable from either end.

Idle-exit policy for engine hosts (the chronic version of the orphan- VRAM bug) is split to gh#35 and targets a later release.

TCP transport is out of scope. When/if it ships, that is the trigger for proper token/OAuth auth — recorded in architecture-cpp.md.

Proposal pointer: .claude/proposals/ACTIVE/v2.1.7-mcp-bridge-relay.md.


v2.1.6 — Configure-dir + sandbox lifecycle fixes + delegation recall

Three consumer-reported issues addressed in one patch release.

gh#31: configure_dir’s project_dir was silently dropped

AgentEngine::get_repo_dir unconditionally cached std::filesystem::current_path() on first call, ignoring the project_dir argument passed to entropic_configure_dir. Consumers whose launcher cwd differed from the target repo (the common case for wrapper CLIs and IDE plugins — bissell-llm-studio invoking the engine from its own source tree against a separate target repo) snapshotted the wrong tree into the sandbox; researcher tiers then read unrelated source. The facade now calls AgentEngine::set_project_dir after configure; get_repo_dir prefers the stored value and falls back to CWD only when no project_dir was supplied.

gh#33: session-killer sandbox + delegation + inspect bug cluster

A single failed delegation poisoned the entire session.

Bug 1 — SandboxManager lifecycle: DelegationManager was constructed as a stack-local inside handle_delegation, owning a fresh SandboxManager it dropped on return — re-snapshotting the whole project on every delegation and emitting a misleading “Session sandbox cleanup” log after every call. SandboxManager is now engine-scoped: AgentEngine owns one, lazily constructed on first delegation; DelegationManager takes a non-owning pointer.

Bug 2 — opaque “(No response from delegate)”: a failed create_sandbox fell through to running the child against the parent’s cwd, then surfaced a generic “no response” error if the child later faulted. The sandbox-unavailable mode is now reported as (DELEGATION FAILED: session sandbox unavailable). Precondition checks are extracted into a helper that keeps execute_delegation under the knots SLOC + returns gates.

Bug 3 — entropic.inspect null-deref: the non-throwing JSON parse returned a discarded value on invalid/empty/null args; the subsequent .value("target", "") threw nlohmann::json::type_error.306 and killed the engine — the recovery tool the lead was prompted to use for diagnosis crashed the engine instead. Discarded / non-object args are now coerced to an empty object so a no-arg entropic.inspect() falls through to the full-state dump.

gh#32: entropic.followup + entropic.resume_delegation

Two new builtin tools give the lead structural recall and resume, instead of relying on attention to buried earlier turns. Prompt instructions (“recall from history when an answer is already there”) weren’t reliable on Qwen-class autoregressive models — a tool call lands as a fresh user-role message the model treats as authoritative.

  • entropic.followup(query, max_results=3) — substring-search past delegation summaries in storage. Returns matching {delegation_id, target_tier, summary, completed_at} records.

  • entropic.resume_delegation(delegation_id, task, max_turns?) — loads the prior child conversation from storage, seeds a fresh child context with it, then runs the new task. The engine resolves the original target tier from storage so the lead doesn’t have to.

These required closing a pre-existing wiring gap: AgentEngine had a StorageInterface member whose function pointers were never populated by the facade — create_delegation and save_conversation were dead code. v2.1.6 wires the interface from SqliteStorageBackend through a set of facade-side bridge trampolines so delegations now actually persist and can be resumed.

Storage backend gains get_delegation_by_id and search_delegations queries; entropic_state_provider_t gains search_delegations and load_delegation_conversation callbacks; StorageInterface gains a load_delegation_with_messages callback for the engine-side resume path.


v2.1.3 — Context pruning + validator evidence + release tooling (SHIPPED)

Two consumer-reported bugs in the context-management path, plus a release-tooling cleanup that surfaced when v2.1.2 hit PyPI publish.

Issue #6: prune fires regardless of context fill

ContextManager::prune_old_tool_results ran on every iteration regardless of actual context fill. A 25-minute session against a 32K-token context window observed 78 prune events at peak fill 29% — dropping evidence that wasn’t crowding anything out and forcing the tier to re-issue duplicate tool calls (16 Duplicate tool call warnings in the affected session).

Fix: gate prune on warning_threshold_percent (the same threshold inject_context_warning uses). Below the threshold, prune is a no-op. At/above, prune by TTL as before. Operators wanting the pre-2.1.3 always-prune behaviour can set warning_threshold_percent: 0 — documented escape hatch, tested.

Also cleaned up the tool_result_ttl doc comment (was misleadingly “(1–20)” but never validated). Now reads >= 1 and validates the lower bound; upper bound is unbounded — operators on large context windows can set arbitrarily high TTLs.

Issue #5: validator runs against pruned context, false-flags valid citations

Companion to #6. When prune legitimately engaged (long delegations on full context windows), the constitutional validator’s critique pass had no way to verify file:line citations against actual content because the manifest stub was the only evidence visible. Reporter’s session showed 4 critique passes fire and 3 reverted by the >50% shrink safety check, eating ~40s per false positive.

Fix: prune now stashes pre-stub content into msg.metadata["original_content"] before stubbing msg.content. The model adapter still sees the stub on next inference (preserving why prune exists in the first place — saving agent context), but a side-channel keeps the real evidence reachable. Engine surfaces it via a new optional tool_evidence field in the POST_GENERATE hook JSON; validator parses it and prepends to the critique prompt under “Tool result evidence (verify citations against this):”. Bounded at 20 most-recent results × 800 chars/each (~16KB max evidence) so long delegations don’t blow up the critique-prompt budget.

Pre-2.1.3 engine compatibility preserved — tool_evidence is optional on the hook contract; engines that don’t surface it give empty evidence and the validator falls back to manifest-only critique as before.

Release tooling fixes

Three follow-up fixes to v2.1.2’s single-VERSION refactor — all casualties of changing pyproject.toml’s version field from literal to dynamic = ["version"]:

  • inv release-check (_cmake_project_version) regex’d CMakeLists.txt for VERSION X.Y.Z. Post-single-source there’s no literal triple to match; v2.1.2’s release-check would have exited “Could not extract project VERSION from CMakeLists.txt”. Fixed: reads VERSION file directly.

  • The model-test results.json schema-writer (_get_version) had the same bug — would have written "version": "unknown" on every minor-bump model run. Fixed: same single-source read.

  • release-pypi.yml’s “Verify pyproject.toml version matches release tag” step grep’d ^version\s*= and read “VERSION” as the version (matching version = {file = "VERSION"}). The v2.1.2 PyPI publish failed for exactly this reason; v2.1.2 shipped tarballs only on GitHub Releases, the wheel re-publishes cleanly via v2.1.3’s fixed flow. Workflow also gained a workflow_dispatch trigger so transient publish failures can be retried against the same release without delete + recreate.


v2.1.2 — External bridge async-task deadlock + single-source version (SHIPPED)

Two unrelated cleanups merged into one patch release:

Issue #4: external_bridge async-task notification deadlocks

A consumer (entropic-explorer ↔ Claude Code MCP) hit a kernel-level deadlock against v2.1.1. Forensic ss -x showed bytes stuck in the bridge’s send queue with the peer’s recv queue undrained — caused by three independently-real bugs ganged together. Fixed all four contributing causes in this release; v2.2 proposal P2-20260429-001-async-bridge-io-architecture.md captures the broader concurrency rework (per-subscriber outbound queues, executor pool, admission control) that’s deferred until api_mutex is liftable under P2-20260421-001.

  • A. Spec-defined notification method. Replaced non-spec notifications/ask_complete with notifications/progress (MCP 2025-06-18 spec) carrying progressToken=task_id. Compliant clients are now obligated to drain it; previously some silently buffered the unknown method, fueling the deadlock.

  • B. Drop inline result body. Notification no longer ships the full result/error text — caps notification size at ~200 bytes regardless of generated output, eliminating a real DoS surface (a 50KB result would otherwise flood every subscriber’s recv buffer on every async completion). Consumers fetch via entropic.ask_status.

  • C. Non-blocking broadcast write. broadcast_notification switched from blocking write() to send(MSG_DONTWAIT); drops slow subscribers on EAGAIN/EWOULDBLOCK the same as EBADF/EPIPE. The async-task thread can no longer be wedged by a non-draining consumer.

  • D. Multi-client accept loop. accept_loop now spawns a per-client thread instead of inline serve_client. Pre-2.1.2 one wedged client also blocked every other operator’s recovery attempt; now multiple MCP clients (e.g. TUI + Claude Code) can be connected simultaneously. stop() rewired to shutdown(fd, SHUT_RDWR) every connected client and join per-client threads cleanly; accept_loop reaps finished threads after each new connection so the tracking vector stays bounded.

Five new SCENARIOs in tests/unit/mcp/external_bridge_test.cpp pin each part of the contract: spec-method assertion against the documented allowlist, no-inline-result negation, sub-50ms broadcast under a slow peer, parallel-connect acceptance, sub-2s stop() join.

Single-source project version

VERSION file at repo root is now the canonical project version. CMakeLists.txt, pyproject.toml, python/src/entropic/__init__.py, the doxygen workflow, and tests/unit/api/api_version_test.cpp all read from it. Bumping the project version is a single edit: echo X.Y.Z > VERSION. Same drift class as the IntEnum issue fixed in v2.1.1 (multiple sources for one fact); the v2.1.1 docs site showed “2.1.0” because Doxyfile carried a stale literal — that class of bug can’t recur post-2.1.2.


v2.1.1 — Consumer-reported regressions (SHIPPED)

Three issues filed by the entropic-demo session against v2.1.0, each with a verifying regression test added in the same change so the class of bug is caught next time it appears:

  • #1: pip wrapper AgentState IntEnum drift — the hand-curated Python enum had 7 states against the C ABI’s 10, silently mislabelling every state from 1 onward (PLANNING/WAITING_TOOL/ DELEGATING/PAUSED not represented). The same drift had also rotted EntropicError (11 entries vs 47). Both regenerated to match the canonical C headers; conformance test (tests/unit/test_bindings_abi.py) parses types/enums.h and types/error.h via AST and asserts forward + reverse coverage so future drift fails CI.

  • #2: POST_TOOL_CALL hook output discarded — the engine fired the hook, captured *modified_json, and free()d it without applying. Documented contract said “transform the result”; the implementation never honoured it, silently breaking redaction / enrichment / DLP / observability hooks. Fixed by routing the hook output into Message::content at every callsite (success, duplicate-rejection, schema-rejection, pre-cancel). Contract pinned in types/hooks.h: replacement is plain text (mirrors POST_GENERATE); chaining is last-write-wins per registry semantics. Five new SCENARIOs in tool_executor_test.cpp cover the four firing paths plus chaining.

  • #3: UTF-8 sanitizer leak past the v2.1.0 boundary — the v2.1.0 sanitize step at the MCP inbound boundary was correct but insufficient: bytes also entered via the model token stream and the audit-replay path, reaching nlohmann::json::dump() in the facade and crashing entropic_run with type_error 316. Generalised to a boundary policy: sanitize at every system seam where bytes change ownership (MCP inbound, model-stream finalization, audit read-back, C-API outbound). Policy documented in include/entropic/mcp/utf8_sanitize.h. Three new SCENARIOs pin serialize_messages against malformed-input regressions.

Layering note: utf8_sanitize.cpp compilation moved from entropic-mcp to entropic-core so that response_generator can sanitize at the inbound model boundary without inverting the core → mcp dependency. Header location and entropic::mcp:: namespace are unchanged for ABI compatibility.


v2.3 candidates (not committed)

Items previously listed as v2.2 candidates that did not make the committed v2.2.0 composition (see the v2.2.0 section above). They remain candidates for v2.3.x or later, awaiting prioritisation:

  • Fine-tuning pipeline: bundled entropic train CLI, QLoRA + DPO from session logs, synthetic data generation with grammar constraints + constitutional filtering, adapter training orchestration, programmatic API alongside CLI. Original v2.1.0 scope; now postponed.

  • RoutingConfig removal: deprecated in v2.1.0 (router model unused in practice; identity-based routing replaced classifier-based). Full struct removal + orchestrator simplify is a follow-up.

  • entropic where / --locate introspection: lets users with multiple installs verify which binary they’re running. Surfaced by the v2.1.0 CLI install-route audit (docs/cli-install-routes.md).

  • Wrapper-side --help interception: prepend install-engine before delegating to the native binary’s usage banner (also from the install-route audit).

  • Anti-spiral STRONG interpretation: forced synthetic completion when consecutive-same-tool counts keep climbing past the threshold + N. v2.1.0 ships the MILD interpretation (system reminder, model self-corrects). Escalate only if field experience shows models routinely ignore the warning.


Deferred to 3.0.0 Roadmap

Planned after 2.0.0 ships. Each item includes context and references for future planning sessions.

Inference backend as a PLUGIN boundary — the 3.0.0 headline

i_inference_backend.h exists but backends are compile-time variants (architecture rule 4). MCP servers are already dlopen plugins with an entropic_create_server() factory (rule 3). 3.0.0 makes the inference backend the same shape, so a vendor NPU backend ships without forking entropic.

Why this is the right seam. entropic’s value is the agent loop — delegation, sessions, tools, grammar, residency. None of it is kernels. On an embedded accelerator you want that loop with somebody else’s inference underneath, and the interface for that already exists; it is only bound at compile time.

What is reachable today vs what needs the plugin. Backends vendored at the current llama.cpp pin: hexagon (Qualcomm NPU), openvino (Intel NPU), cann (Ascend), opencl, vulkan, webgpu, sycl, et, zdnn.

target

path

effort

Qualcomm / Hexagon

ggml backend IN TREE

compile-time variant

Intel NPU, Ascend, Mali/Adreno

ggml backends IN TREE

compile-time variant

RKNN (Rockchip), DRP-AI (Renesas), EdgeTPU

NOT ggml, do not run GGUF — vendor toolchains, pre-compiled models

one backend each, behind the plugin boundary

Open questions (per-runtime capabilities, capability negotiation, multi-artifact registry, first target) are tracked in gh#215.

Prove the boundary with one non-ggml backend. RKNN is the most tractable: RK3588 is already in this repo’s test vocabulary, and the board is obtainable.

Embedded compilability is a precondition, not a separate theme. Cross-compilation, static/musl, a size budget, no-exceptions builds, and a supported-target matrix. The CPU .so is 17.5 MB today, which is already viable — that number is a budget to defend, not a problem to solve.

Explicitly NOT in scope: phase-aware tensor placement in llama.cpp. Measured at 2.7-5.3% (v2.13.2 bench, gh#193) and the cost is a fork of ggml’s allocator and graph-build layer against a pin this project bumps by ~1,000 commits at a time. The same effort against prompt-cache hit rate is worth ~27% on the same turn and lives in code we own. Revisit only if the cache work lands and prefill is still the dominant term.

SSM / Mamba Hybrid State Management

Extract/restore recurrent hidden state for hybrid Mamba-Transformer models. Serialize to disk for persistent memory across sessions.

  • GDN (Gated Delta Networks / Falcon-H1) kernel support already merged in llama.cpp

    • CUDA, Vulkan, Metal kernels: https://github.com/ggml-org/llama.cpp/pull/20340

    • Speculative decoding incompatible with recurrent models: https://github.com/ggml-org/llama.cpp/pull/19270

  • Prompt caching for recurrent models fixed upstream: https://github.com/ggml-org/llama.cpp/pull/19045

  • Backend abstraction (1.9.13) designed to accommodate this

  • Context: memory notes on SSM vectoring from 2026-03-17 session

Fan-Out Routing

Router classifies input → routes to MULTIPLE identities executing in parallel. Requires parallel sequences/batched inference in the backend.

  • llama.cpp batch API exists but Entropic uses single-sequence through 2.0.0

  • Fan-out generates in parallel, results collected by coordinator

  • Hooks: on_fan_out, on_fan_in

  • Context: .claude/proposals/ideas/entropic-3.0-robotics-roadmap-asks.md (Section 1)

Coordination / Safety Interlock Layer

After fan-out, validate combined outputs don’t conflict before actuation.

  • CoordinatorConfig: model-based, rule-based, or hook-based validation

  • Output: {approved, modifications, reason}

  • Context: .claude/proposals/ideas/entropic-3.0-robotics-roadmap-asks.md (Section 2)

MoE Expert-Level VRAM Caching (P3-023)

Expert LRU cache in GPU VRAM with activation-aware placement. Optimize 256-expert MoE models.

  • Context: .claude/proposals/ideas/P3-20260226-023-moe-expert-vram-caching.md

Multi-Agent Concurrent Instances

Multiple independent agent loops in one Entropic instance. Each with own identity set and MCP scope.

Voice Integration

Hook points exist from 1.9.1. Full STT/TTS/S2S implementation deferred. Engine provides hooks only — consumers provide models and audio I/O.

Physical Actuator Safety Constraints

Tool-level safety constraints enforcing physical limits regardless of model output. ToolSafetyConfig: min/max ranges, rate-of-change limits, forbidden combinations. Emergency stop: engine.emergency_halt().

  • Context: .claude/proposals/ideas/entropic-3.0-robotics-roadmap-asks.md (Section 4)

NPU Backend (AxeraBackend)

AX630C, Pulsar2 toolchain, .axmodel format (NOT GGUF, NOT llama.cpp). Subclass of InferenceBackend interface designed in 1.9.13.

  • Context: .claude/proposals/ideas/entropic-3.0-robotics-roadmap-asks.md

Speculative Decoding — moved to v2.1.11

Previously deferred here under the rationale “blocked by single-GPU VRAM constraint — needs multi-GPU or smaller primary model.” That rationale assumed a GPU-resident draft competing with the primary. CPU-led draft as the default placement invalidates the blocker — the GPU stays saturated verifying while CPU headroom handles the drafting, no VRAM competition.

Now scoped under v2.2.0 release plan (v2.1.11 patch) — see issues gh#27 and gh#36 and the proposal at .claude/proposals/BACKLOG/v2.1.11-speculative-decoding.md.

Still out of scope for 2.x: tree-based speculation / multi-branch drafts, self-speculation / Medusa heads. Both are follow-ups if specific consumer demand emerges.

  • llama.cpp supports it, auto-disables for recurrent models

  • https://github.com/ggml-org/llama.cpp/pull/19270

Fused MoE Gate+Expert Weights

7-9% prompt processing speedup. Model conversion flag (--fuse_gate_up_exps). Investigate whether unsloth quants already include this.

  • https://github.com/ggml-org/llama.cpp/pull/19139

Model Candidate Investigation

Benchmarking roadmap for SSM/hybrid and specialized models when evaluation framework is mature.

  • Context: .claude/proposals/ideas/P2-20260302-030-model-candidate-investigation.md


Deprecation Plan

All existing proposals in ACTIVE/ and ideas/ are absorbed into this roadmap. Before work begins, they move to .claude/proposals/.old/ for reference. They are NOT deleted — just archived.

Files to move to .old/ (when work begins)

From ACTIVE/:

  • P1-20260226-022-vram-orchestration.md → absorbed into v1.8.2

  • P1-20260302-028-tui-overhaul.md → absorbed into v1.7.2 + post-2.0.0

  • P2-20260225-020-gpu-resource-management.md → absorbed into v1.9.7

  • P2-20260225-021-time-based-generation-cap.md → absorbed into v1.9.7

  • P2-20260302-026-runtime-mcp-registration.md → absorbed into v1.8.7

From ideas/:

  • entropic-2.0-roadmap-asks.md → absorbed into this roadmap (all items)

  • entropic-2.0-game-requirements.md → context doc, absorbed into 3.0.0 deferred

  • entropic-3.0-robotics-roadmap-asks.md → context doc, absorbed into 3.0.0 deferred

  • P1-20260213-012-per-tier-model-finetuning.md → absorbed into v2.1.0

  • P1-20260302-031-qwen35-vision-support.md → absorbed into v1.9.11

  • P1-20260309-033-native-inference-layer.md → absorbed into v1.8.0–v1.8.9

  • P2-20260204-005-tool-abandonment-detection.md → dropped (1.7.0 sufficient)

  • P2-20260209-010-diagnostic-lsp-integration.md → absorbed into v1.8.5

  • P2-20260302-030-model-candidate-investigation.md → dropped (ongoing, not versioned)

  • P2-20260309-032-constitutional-validation.md → absorbed into v1.9.8

  • P2-20260309-034-tui-repo-separation.md → absorbed into v1.7.2

  • P2-20260310-001.md → context doc (game consumer), absorbed into 3.0.0 deferred

  • P2-20260311-001.md → context doc (IoT consumer), absorbed into 3.0.0 deferred

  • P3-20260226-023-moe-expert-vram-caching.md → absorbed into 3.0.0 deferred

New individual proposals will be created in ACTIVE/ for each versioned milestone as work begins, with full implementation plans and validation criteria.