An exo-kernel for AI agents.
Optimax stays thin and leaves your Orchestrator model in charge. Underneath it, one layer manages the three resources of an agent session: which model, at which effort, does each delegated task (process); what enters the context window (context); and what persists between sessions (memory). It works with Claude Code and Codex and is made by Ālo Labs.
- Website: alo-exp.github.io/optimax
- Source and releases: alo-exp/optimax, releases
- Changelog and install guide
The current version is 0.6.0, a published prerelease. Expect changes between versions.
An operating system kernel answers three questions about scarce resources. An agent session has the same three. Optimax answers each one with a single owner.
| Manager | Question it answers | Run by |
|---|---|---|
| Process | Which model, at which effort, does this delegated task? | The controller and a score ledger |
| Context | What enters the context window, and how compressed? | RTK, Context Mode and LeanCTX |
| Memory | What persists after the session ends? | Graphify and agentmemory |
The application stays above the layer. Your session model remains the Orchestrator: it plans, delegates and decides. Optimax does not change it.
Optimax delegates bounded work to an Executor and asks an Advisor for planning and design advice. Each has its own ladder of model and effort pairs, ordered from lowest to highest rung. The policy lives in the Optimax skill.
| Host | Executor Ladder |
|---|---|
| Claude | Haiku High → Haiku XHigh → Haiku Max → Sonnet High → Opus Medium → Opus High |
| Codex | Terra Low → Terra Medium → Terra High → Sol Medium → Sol High → Sol XHigh → Sol Max |
| Host | Advisor Ladder |
|---|---|
| Claude | Opus Medium → Opus High → Opus XHigh → Opus Max |
| Codex | Sol XHigh → Sol Max → Astra Max |
Each bounded Executor assignment is classified by tier. The tier sets the rung it starts on, and that rung is also its floor: results can move a task up from it, but never below it.
| Tier | When it applies | Claude start and floor | Codex start and floor |
|---|---|---|---|
low |
Localized, explicit behavior, few dependencies | Haiku High | Terra Low |
medium |
Connected decisions or investigation | Haiku Max | Terra Medium |
high |
Substantial uncertainty, interacting invariants, consequential failure modes | Sonnet High | Terra High |
A fourth tier, business_doc, covers generation of final PDF, Word, PowerPoint, Google Docs or Slides files. See the skill for its rungs.
The Advisor has one track per host and no tier. Its minimum starting rung comes from the consultation context: Medium starts at the first rung, High at the second and Super High at the third. The Orchestrator consults the Advisor before any plan or design is finalized, including planning for a low task. It then checks the advice itself and owns the decision. The Advisor does not implement its own recommendation.
Every delegated result is assessed independently on a 0 to 5 rubric, defined in the policy: 0 unusable, 1 major failure, 2 substantial deficiencies requiring rework, 3 useful with material gaps or incomplete verification, 4 strong with minor deficits, 5 fully verified and complete within the assigned scope. Once a track has five eligible runs, the five newest decide the next move:
- Average of 4.5 or less: move up one rung.
- Five straight 5s: move down one rung, never below the floor.
- Anything else: stay on the same rung.
Individual defects still require bounded rework whatever the average. With five whole-number scores, the highest average that triggers a move up is 4.4, so an average of 4.6 stays put.
Scores are kept in a plain CSV ledger, one per user and project, at model-perf/<user>-model-perf.csv. Executor tracks are kept per host, tier, exact model, effort and epoch. Advisor tracks use the same key without a tier. The controller reference describes the serialized controller that reads and writes the ledger. Keep project ledgers private.
The bundled Review Ladder skill runs staged independent review, repair and verification of a bounded scope. Once the host discovers the bundled skill, invoke $review-ladder in Codex or /optimax:review-ladder in Claude Code and supply the review scope. Short aliases depend on the host; use the discovered command name.
Review Ladder follows its explicit, user-authorized model and effort sequence through the contracted rungs independently of whether Optimax's adaptive policy is on or off, subject to the host's model, effort, and delegation capabilities. Invoking it does not enable the adaptive policy or change the selected Orchestrator. The adaptive controller cannot represent every fixed review rung and has no fixed-rung override.
A review with policy enabled and a valid matching pre-dispatch adaptive reservation follows ordinary adaptive eligibility rules. An unmatched fixed review, or one run when the policy is off, uses supported host dispatch and an ordinary durable review report with actual assignment IDs, requested settings, candidate/scope/pass and outcomes. These report-only reviews are excluded from adaptive learning even with a later receipt, and existing adaptive history is preserved. Unsupported fixed rungs block without substitution. Missing effective receipts remain explicit unknowns. Controller launch rows are reservations, and host confirmation, failure and cancellation are reported separately; see the limited recording path.
The context and memory managers are a five-tool stack with exactly one owner per job. The bundled Context Stack skill installs, wires, verifies and repairs it on Claude Code and Codex. Invoke /optimax:context-stack in Claude Code or $context-stack in Codex.
| Job | Owner | Manager |
|---|---|---|
| Graph and structure (orient first) | Graphify | Memory |
| Memory across sessions | agentmemory | Memory |
| Shell output | RTK | Context |
| Sandbox, grep, slice, web fetch | Context Mode | Context |
| Read, AST, path jail, injection guard, wire | LeanCTX | Context |
Nothing is installed or wired without your explicit yes. The commands are plan, install, wire, verify and repair on skills/context-stack/scripts/stack.py:
python3 skills/context-stack/scripts/stack.py plan --tools allshows every host file diff and command first.install,wireandrepairthen need--yeswith an explicit--toolslist. Without a TTY they only print the plan and exit 2.- Consent is recorded per user in
~/.optimax/stack/consent.json, never read from a repository. Extra steps are separate opt-ins:disable_cm_plugin,remove_conflicting_hooks,repair_tool_config,service,project_files. - Context Mode is licensed Elastic-2.0 and must be accepted with
--accept-license context-mode=Elastic-2.0. Graphify indexing of documentation may call an LLM API. stack.py verifyexits nonzero on any failed check: manifest, versions, RTK identity, MCP handshakes, overlapping tool names, duplicate registrations, hook order and agentmemory health.
Optimax shares the vendor-neutral five-tool-stack/v1 manifest with Silver Bullet. When Silver Bullet is installed it owns wiring and Optimax only verifies. Context Mode 2.x is wired as server --agent <host>. Optimax never runs rtk init --codex, and it touches AGENTS.md or CLAUDE.md only to remove LeanCTX's marked rules block when you opt in to repair_tool_config. After an updater such as lean-ctx update it restores your instruction files byte for byte and re-wires. See INSTALL.md for host setup.
Cloud sessions start from a clean checkout, and parallel threads each learn something. A repository can opt in to syncing the score ledger through git so that learning survives. To enable it, commit this file:
{"schema":1,"sync":"on"}Save it as .optimax/team.json in the project. Sync is enabled per project, never per person.
- Each session's ledger is committed on its thread branch and pushed. It is reconciled against the default branch: main wins, then this session's rows are replayed on top.
- Sync acts only in sessions that are already on.
team.jsonnever turns Optimax on; itssuggestsetting can only suggest a default. OPTIMAX_SYNC=0is a personal opt-out.OPTIMAX_AUTOACTIVATE=0also stops it.- It never force-pushes, never bypasses hooks and never syncs on the default branch.
- A synced ledger publishes user IDs, session IDs, model IDs and scores in git history, and it applies to everyone who runs Optimax in that repository. Agree on it with contributors first. The first sync reports a publication notice.
The controller reference has the full gate rules.
Installation alone enables nothing. Optimax applies only after you turn it on, for a session or as a standing default. Install through the unified Ālo Labs agent-plugins catalog. These commands require marketplace support in your client, and you should check the installed version afterwards, because catalog resolution and host installation are separate steps. Avoid loading a second standalone copy of Optimax alongside the plugin.
Claude Code:
/plugin marketplace add alo-labs/agent-plugins
/plugin install optimax@alo-labs
/optimax:optimax on
Codex:
codex plugin marketplace add alo-labs/agent-plugins
codex plugin add optimax@alo-labs-codex
codex plugin list --jsonThen, in a Codex conversation, run $optimax on. Codex trusts plugin hooks per content hash and silently skips untrusted ones, so open /hooks once after installing or updating and trust the Optimax SessionStart hook. The install guide covers cloud sessions, Claude Projects and the context stack.
| Command | Effect |
|---|---|
/optimax:optimax on or $optimax on |
Enable the policy for this session |
/optimax:optimax off or $optimax off |
Disable it for this session |
/optimax:optimax status or $optimax status |
Show what applies here and why |
on --scope project |
On for every new session in this project |
on --scope user |
On for every project you open |
off --scope project|user |
Remove that default or override a broader one |
OPTIMAX_AUTOACTIVATE=0 |
Kill switch: no default applies while it is set |
A session is enabled only by an explicit on or by a standing default you set yourself with on --scope. Each new session then applies the default through the same explicit on path, with an instruction audit, a recommendation and a disclosed source. A read-only SessionStart plugin hook only injects context and cannot enable a session or enforce anything. A committed .optimax/team.json can only suggest activation. Preferences hold consent metadata only. In cloud sessions use OPTIMAX_DEFAULT, OPTIMAX_USER or OPTIMAX_PREFS_PATH; see INSTALL.md.
Each explicit activation, including repeated on, checks conventional host instruction files for potential conflicts. The host must review their applicability and priority; the audit cannot prove which files loaded or that all instructions are compatible. See instruction audit usage and limits. Status and off do not run the audit.
Standing defaults live outside the ledger. A project default is at PROJECTROOT/.git/optimax/activation.local.json in a git checkout, or PROJECTROOT/.optimax/activation.local.json otherwise, and is bound to its checkout. A user default is at ~/.optimax/activation.json. The controller uses PROJECTROOT/model-perf/<actual-user-id>-model-perf.csv, where the project root is the canonical primary checkout and the user ID is a stable, verified identity. The rename from earlier policy names does not reset or migrate learning: the historical optimal-ultra-ladder-v1, v2, and v3 identifiers, lineage, events, and epochs remain intact.
Optimax provides instructions and a deterministic controller. It cannot guarantee model availability, force a host to follow instructions, verify hidden native workers, or change the user's orchestrator. Native orchestration is only partially optimizable when worker model, effort, or attribution is opaque. Independent review remains the Orchestrator's responsibility. See the skill and its references for policy, safety, and recovery.
Verification is dated and narrow. On 15 November 2026, installed Codex v0.2.0 passed discovery, session controls and one bounded native Advisor/Executor TDD fixture on CLI 0.167.0-alpha.4.1, and Claude Code 2.1.283 passed isolated exact-archive discovery, controls/resume and a separate direct Agent TDD fixture. Claude used session-only plugin loading, which does not qualify a persistent main-profile marketplace installation. The released v0.4.0 package was later live-tested in Codex CLI 0.172.0, as INSTALL.md records. Full Ultra/Ultracode, parallel Executor scheduling, authenticated helper effort, adaptive learning, native Windows and complete ladder execution remain outside the live coverage. See the verification report, the Claude acceptance record and the Codex acceptance record for exact evidence and limits.
Windows controllers sharing a project must use the same resolved user profile with a writable ~/.optimax/locks cache. Portable regression tests cover the locking paths on POSIX; native Windows execution remains untested.
Run the local test suite from the repository root:
python3 -m unittest discover -s tests
python3 build_release.py --output distThe second command builds the allowlisted, deterministic plugin archive. If the output directory contains the older optimax-skill.zip, the builder rejects it, so choose a fresh directory. Use an output directory under your exclusive control: a concurrent uncooperative replacement may be overwritten, and a normal rebuild intentionally replaces the archive. The archive excludes project ledgers, caches, tests and session reports. Live host discovery, control behavior and published catalog resolution are separate acceptance gates.
The website source is in site/: plain HTML, CSS and JavaScript with a small Node build script and no framework. From site/, run npm ci, npm test, npm run build and npm run test:browser to install the locked dependencies, test, build site/dist and check the rendered pages in a browser. GitHub Pages serves it; see website deployment. The custom hostname optimax.alolabs.dev awaits a separate DNS cutover.
MIT licensed; see LICENSE.