Skip to content

RFC: replace Headless with a minimal Eval kernel #2598

Description

@Astro-Han

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
Loading
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 maka or generic external.
  • Harbor and Pier are executors, not separate workflows.
  • maka eval is 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_deadline as a stop-session source in packages/runtime (session-manager.ts, message-authority.ts, session-projection-helpers.ts) and packages/runtime-host (root-turn-coordinator.ts). session-projection-helpers normalizes it to benchmark.deadline and projects it. Its only producers are in Headless.
  • Eval artifact layout hardcoded into context compaction: /maka-task-run/, /exports/harbor-, /task-run.json and a self-check verifier pattern in packages/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:

  • subject in packages/runtime-host/src/protocol/task-ledger.ts is 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/headless is gone.
  • @maka/eval has 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_deadline stop source, Eval artifact paths in compaction heuristics, and the headless tool 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions