Repository navigation
Description
Problem
packages/headless duplicates Maka execution outside Runtime Host and has accumulated TaskRun, autonomous loops, self-check, specialized workflows, and multiple entry points.
The operative problem is authority, not size or missing abstraction: Headless constructs and owns runtime concepts — sessions, turns, backends, tool surfaces, Agent Graph behavior, continuation, events — outside Runtime Host.
Proposal
Delete packages/headless and replace it with a minimal @maka/eval.
flowchart TD
CLI["maka eval"] --> E["Experiment kernel"]
E --> C["Cells<br/>task × repetition × subject"]
C --> X["Executor<br/>Harbor or Pier"]
X --> M["Maka subject"]
X --> O["External subject"]
M --> R["Runtime Host<br/>ephemeral session"]
M --> K["Result"]
O --> K
Experiment = benchmark + executor + subjects + tasks + repetitions
A/B is simply a two-subject experiment.
Principles:
- All Maka runs go through Runtime Host.
- Eval depends on the Runtime Host client/protocol only, never on Runtime implementation, and never constructs Runtime objects.
- Subjects are either
makaor genericexternal. - Harbor and Pier are executors, not separate workflows.
maka evalis the only public CLI.- One fully expanded spec defines each experiment.
- Infrastructure-failed cells can be replaced individually; the earliest valid attempt wins.
- Results contain only score, usage, cost, duration, status, and artifacts.
Three concepts that Headless conflates stay distinct:
repetition = a new experimental sample
infra retry = a replacement attempt for the same cell
continuation = subject-internal behavior owned by Runtime Host
Delete
Do not port or preserve:
- TaskRun
- Autonomous Loop
- Heavy/Self-check
- specialized A/B workflows
- duplicated runtime, session, and event models
maka-headless- compatibility and legacy result readers
Heavy/Self-check is deleted outright. It is subject behavior, not an Eval workflow — but it is not preserved as a subject setting either. Comparing self-check on/off is a two-subject experiment, not a kernel feature.
Runtime Host must also shed Eval concepts, and these reach past Runtime Host into Runtime and Core:
benchmark_deadlineas a stop-session source inpackages/runtime(session-manager.ts,message-authority.ts,session-projection-helpers.ts) andpackages/runtime-host(root-turn-coordinator.ts).session-projection-helpersnormalizes it tobenchmark.deadlineand projects it. Its only producers are in Headless.- Eval artifact layout hardcoded into context compaction:
/maka-task-run/,/exports/harbor-,/task-run.jsonand aself-checkverifier pattern inpackages/runtime/src/active-full-compact-facts.ts.
Removing the package also removes its host seams: the @maka/headless dependency and maka inspect in packages/cli, the headless tool host id in packages/core/src/tool-catalog.ts, and the headless build steps in the root package.json. maka eval replaces the existing eval-router entry point rather than adding a new one.
Two look-alikes must survive, to avoid over-deletion during execution:
subjectinpackages/runtime-host/src/protocol/task-ledger.tsis a task title field, unrelated to Eval subjects.- The Goal tools in
packages/runtime(GoalSet/GoalPause/GoalResume) are product autonomous execution — subject behavior owned by Runtime Host, not the Headless Autonomous Loop.
This is an intentional breaking cutover. No existing experiment needs resume support.
Done when
packages/headlessis gone.@maka/evalhas no build-time dependency on Runtime implementation and constructs no Runtime objects.- No benchmark, repetition, score, or A/B concept remains in Runtime, Runtime Host, or Core — including the
benchmark_deadlinestop source, Eval artifact paths in compaction heuristics, and theheadlesstool host id. - The current cohort runs from one declarative multi-arm spec.
- Maka, competitors, and Maka setting variants use the same kernel.
- A single failed cell can be retried without rerunning the cohort.
- Adding a subject does not require changing the kernel.
Review
Please identify any current Headless capability that is both necessary and not represented above. Otherwise, delete it rather than migrate it.
Activity
likun666661 commentedon Aug 9, 2026
I think the core of this RFC is the separation of two different domains that Headless currently mixes together.
First,
packages/headlesshas become a second Maka runtime. This is an authority problem, not primarily a code-size or abstraction problem. It constructs and owns runtime concepts such as sessions, turns, backends, tool surfaces, Agent Graph behavior, continuation, and events outside Runtime Host.The invariant should be:
Ideally this is also a dependency boundary: Eval may depend on the Runtime Host client/protocol, but must not depend on Runtime implementation or construct Runtime objects directly. Runtime Host remains the sole authority for Maka execution.
Second, there is still a legitimate evaluation domain. Removing the second Runtime must not erase the benchmark kernel. Eval owns:
It answers what to run, for which subjects and tasks, how many repetitions, on which executor, and how results are selected and compared. It does not own Session, Turn, Agent Graph, continuation, self-check, or agent lifecycle.
This also makes three currently conflated concepts distinct:
From that boundary:
The resulting architectural invariants should be:
So the cutover should extract the valid Eval domain and delete the duplicated Runtime domain, rather than treating existing Headless capabilities as things to migrate by default.
Astro-Han commentedon Aug 9, 2026
Agreed on the framing, and I've adopted it as the basis for the final version of the issue.
Your reframing is the correction I needed: I described this as duplication causing size, drift, and CI cost, but the operative problem is authority. That also replaces the filter in my Review question — the test is not "is this capability necessary" but "which domain does it belong to". Under that test, nothing currently in Headless is both necessary and unrepresented, so the cutover stands as a deletion, not a migration.
Three things folded into the issue.
1. The dependency boundary becomes an acceptance criterion.
My original wording ("all Maka runs go through Runtime Host") only constrained runtime behavior. Making it a build-time boundary is stronger and mechanically enforceable, so it is now in Done when:
@maka/evalmay depend on the Runtime Host client/protocol only, never on Runtime implementation, and never constructs Runtime objects.2. The reverse invariant is already violated, and more broadly than I assumed.
I had only constrained the Eval side. Your point 3 has concrete outstanding items today, and they reach past Runtime Host into Runtime and Core:
benchmark_deadlineis a stop-session source inpackages/runtime(session-manager.ts,message-authority.ts,session-projection-helpers.ts) andpackages/runtime-host(root-turn-coordinator.ts).session-projection-helpersnormalizes it tobenchmark.deadlineand projects it, so a benchmark concept reaches the session event stream. Its only producers are in Headless, so after the cutover it is a dead enum and a dead projection branch.packages/runtime/src/active-full-compact-facts.tshardcodes Eval artifact layout —/maka-task-run/,/exports/harbor-,/task-run.json— into context-compaction heuristics, plusself-checkin a verifier pattern.packages/core/src/tool-catalog.tstreatsheadlessas a first-class tool host id, so every surface definition carries aheadlessfield.All of this is in scope for the cutover, not follow-up work.
Two look-alikes should explicitly survive, to avoid over-deletion during execution:
subjectinruntime-host/src/protocol/task-ledger.tsis a task title field, unrelated to Eval subjects; and the Goal tools inpackages/runtime(GoalSet/GoalPause/GoalResume) are product autonomous execution — subject behavior owned by Runtime Host, not the Headless Autonomous Loop.3. Heavy/Self-check is deleted outright, not preserved as a subject setting.
We agree it leaves Eval. To be explicit: it is not kept as a subject setting either. Concretely it is
self_check_plan_submitandself_check_submit—MakaTools constructed in Headless, plus a completion gate, policy, evidence, finalization, and export path. So it is a clear instance of the authority problem: Headless building a tool surface outside Runtime Host.But its evidence contracts (
HeavyTaskSelfCheckPlanAuditSummaryand friends) have no consumer on the Runtime Host side. "Move it to a subject setting" would turn a pure deletion into a rebuild, for a capability that grew to serve benchmark scoring. If we want it later, the right shape is a distinct subject variant compared against baseline through the same kernel — which is exactly what the two-subject experiment model gives us for free, with no Eval-side switch.Your repetition / infra retry / continuation split is in the issue verbatim. It was implicit in the original spec and easy to lose during execution: deleting Autonomous Loop must not delete cell-replacement semantics.