Kernel V3 engine

Kernel V3 is Zagens’ production event-sourced turn engine — the same core on desktop, zagens-tui, and the headless zagens CLI.

Since v0.8.0, Kernel V3 is the only production turn path. Older shadow/diagnostic APIs (kernel-shadow) are removed.

What it means for you

Benefit Explanation
Consistent behavior Desktop sidecar, terminal TUI, and CLI share one turn semantics — fewer “works in GUI but not in CLI” surprises
Reliable session resume Turns are recorded as an append-only kernel event log in sessions.db; resume prefers log-first transcript repair over fragile session JSON alone
Auditable turns Model calls, tool batches, approvals, steer injections, and LHT continuations leave structured events you can replay in CI

You do not configure “Kernel V3” in Settings — it is always active in current releases.

Three surfaces, one engine

Surface How runtime runs Best for
Desktop (Tauri) zagens-runtime sidecar on localhost Diff, replay, embedded PTY, Office mode
Terminal TUI (zagens-tui) In-process runtime Full-screen terminal UI on Windows / macOS / Linux
CLI (zagens) In-process runtime exec, review, serve --http, CI

All three call the same LiveTurnMachine + EffectInterpreter pipeline inside zagens-core.

Log-first session resume

When you reopen a thread after restart:

  1. Zagens loads persisted kernel events for that turn history.
  2. The transcript is repaired from the log when needed (default log_transcript_repair = true).
  3. Desktop, TUI, and CLI resume the same SQLite thread store under ~/.zagens/.

This is especially important for long LHT or CRAFT runs that span many tool steps.

Related concepts

Further reading

Product technical spec (maintainers): AGENT_KERNEL_V3.md