The Agent Kernel

How sikemux-core separates a deterministic Rust kernel from model-owned work with Shared Space, Spec ledgers, and 26 MCP syscalls.

6 min readUpdated 4 Dec 2026Sikemux 0.6

Sikemux treats coding-agent infrastructure as a thin, deterministic operating-system kernel rather than a stack of LLM orchestration pipelines.

As models improve, scaffolding built on heuristics (background memory summarizers, LLM routers, and hardcoded prompt pipelines) decays into liability. What models still cannot invent inside a context window are process isolation, cryptographic provenance, deterministic storage, and enforced security boundaries. Sikemux puts those guarantees in a long-lived Rust daemon (sikemux-core) and leaves planning, writing, and judgment to whichever agent harness you run on top.

Process and wire architecture

The desktop app (sikemux), iPhone and Android apps, MacBook notch island, and linked hosts are all thin clients of one background core process. Clients never parse agent output, compute status, or store shadow state: they render snapshots from the core and send user actions back as typed Call requests.

CODE
+-------------------------------------------------------------------+
| Thin Clients (GPUI Desktop · iOS · Android · Notch · Linked Host) |
+---------------------------------+---------------------------------+
                                  |  sikemux-wire (versioned frames)
                                  |  + sikemux-view (display payloads)
                                  v
+-------------------------------------------------------------------+
| sikemux-core (long-lived Rust daemon, outlives every window)      |
|  - PTYs, folded chat transcripts, hash-chained history logs       |
|  - Shared Space (LWW-CRDT, SHA-256 blobs, fencing leases)         |
|  - Spec Ledger + Signed Verifier Receipts + Capability Sandbox    |
|  - Git worktrees, line-owned commits, linear landing queue        |
|  - Vault blind-fill, Lethal-Trifecta taint, MCP manifest pinning  |
+---------------------------------+---------------------------------+
                                  |  Local broker (~/.config/sikemux/cli.json)
                                  |  + sikemux-host --tools-mcp (stdio)
                                  v
+-------------------------------------------------------------------+
| Agent Harnesses (Claude Code · Codex · Antigravity · OpenCode ...) |
+-------------------------------------------------------------------+
  • Outlives the UI: Closing or quitting the desktop window disconnects the UI while shells, dev servers, and agents keep running under sikemux-core. On updates, the core persists state, keeps sockets and terminal file descriptors open across exec, and replaces itself in place.
  • One wire contract: sikemux-wire defines the versioned framing and protocol shared by desktop, mobile, and remote iroh endpoints. Display-only types live in sikemux-view, which mobile builds do not link.
  • Headless host support: sikemux-host ships the sikemux CLI launcher, the --tools-mcp stdio server for agents, and the core binary without linking any window toolkit, so remote Linux servers and linked hosts run the exact same kernel.

Kernel-owned vs. model-owned boundary

Every feature in Sikemux sits on one side of a hard boundary:

ConcernOwned by sikemux-core (deterministic Rust)Owned by the agent harness (model + skills)
State & memoryDurable storage, SHA-256 blobs, fencing leases, git-diff staleness checks, .sikemux/space/memory/ linterDeciding what to remember, how to organize notes, and when to prune or retire them
VerificationRunning the verification command, hashing the git tree, signing the VerifierReceipt, enforcing budgetsChoosing what to build, reading failures, and fixing the code
CoordinationDirect messages, identity separation (LocalPerson vs. Agent), reactive triggers, spend capsDeciding whom to spawn, how to split work, and when to hand off
Git & isolationWorktree creation, copy-on-write cloning, port allocation, line-level edit ownership, linear landing queueWriting code, running builds, choosing commit messages
SecurityVault blind-fill, Lethal-Trifecta egress taint, Write-Promotion Gate, remote MCP SHA-256 manifest pinningCalling tools through references (vault:<id>) and requesting approvals via ask
Orchestration policySeeding editable Markdown skills once on first run (sikemux-chief, sikemux-workflows)Following, adapting, or overriding workflow habits per user or project

Background LLM “dreamers” and automatic LLM goal summarizers are intentionally absent from the kernel: the core never spends tokens silently rewriting your history or summarizing your memory behind your back.

The three kernel primitives

1. Shared Space and file-backed memory

Agents share structured state through the space tool across three scopes:

  • personal: your cross-project state, synced end-to-end encrypted across your hosts.
  • project: repository-scoped state shared by every checkout and agent working in that repo.
  • org: organization-scoped state (used by multi-host Team sync on the Nightly channel).

Inside sikemux-core, SharedSpace provides three deterministic mechanisms:

  • Structured entries & blobs (BlobPool): Inline values are capped at 256 KB. Larger artifacts are stored in a content-addressed SHA-256 blob pool (blob_put / blob_get) up to 25 MB per blob.
  • Fencing leases (LeaseStore): Coordinated writers acquire time-bounded leases (lease_acquire, lease_renew, lease_release) with a default TTL of 60 seconds (clamped between 5 seconds and 15 minutes). Each acquisition increments a monotonic fencing_token: u64; writes carrying a stale leaseToken are rejected deterministically.
  • File-backed memory tree + zero-LLM linter: Projects can keep plain Markdown notes under .sikemux/space/memory/ with an index.md capped at 200 lines (scanning up to 500 files). Running space(action: "lint"), or opening a project with that directory, deterministically checks for:
    1. a missing or oversized index.md,
    2. broken relative links or wikilinks,
    3. leaked secret patterns, and
    4. git-diff staleness on code-anchored notes (up to 12 anchored paths per note).

See What Sikemux remembers and Project Home for how rules, knowledge, and decisions are surfaced in the UI.

2. Spec Ledger, Verifier Receipts, and Hash-Chained History

When agents claim “tests pass” in prose, nothing binds that claim to the repository tree. Sikemux replaces self-reported status with three tamper-evident ledgers:

  • SpecLedger (rules and decisions): Every rule and architectural decision is appended to a SHA-256 hash-chained ledger (starting from GENESIS, retaining up to 1,024 receipts), tagged with its signer (LocalPerson, OrgAdmin, or Agent). The ledger computes a stable prefix_hash so unchanged rules preserve LLM prompt KV-cache prefixes across turns, and serves delta_since diffs when a rule changes mid-session.
  • VerifierReceipt & GoalBudget: When a goal defines a verification command, the core executes it directly and signs a VerifierReceipt containing the command, exit_code, passed flag, repository tree_hash, host_key, duration, and output excerpt (up to 64 receipts per goal). Failed runs are recorded as SteppingStone entries (up to 64 per goal) alongside hard GoalBudget limits (max_usd, max_wall_ms, max_attempts).
  • Hash-chained chat transcripts: Every chat log links each entry to prevHash from "genesis" (up to 512 MiB, zstd level 3) with deterministic chain verification across plain and compressed history files.

3. Capability Sandbox

The kernel enforces isolation and egress boundaries outside the prompt window:

26 canonical syscalls

Every connected agent harness (whether Claude Code, Codex, Antigravity, OpenCode, or another supported agent) talks to the kernel over one compact MCP surface (sikemux-host --tools-mcp). Internal operations are folded into 11 tool families plus 15 standalone tools (26 canonical syscalls total, or 25 on platforms without sim):

GroupTools
11 tool familiesbrowser, sim, process, agent, page, task, memory, trigger, vault, mod, theme
15 standalone toolsworkspace_inspect, setup_check, hold, ui_open, events_wait, who_wrote, why, sign_in, ask, decide, git_commit, skills, space, app_console, desktop_drive

Keeping the syscall surface narrow preserves context budget across every harness and ensures that adding a new action to an existing family never bloats every agent’s tool schema. See MCP tools for the generated reference.

Manifest-driven @Chief and editable skills

Orchestration behavior does not live in hardcoded Rust strings. On first launch, Sikemux seeds editable Markdown skills into its data directory (<data_dir>/skills/), including:

  • sikemux-chief/SKILL.md: delegation discipline, checking existing workers before spawning duplicates, framing clear done criteria, and routing human decisions through ask.
  • sikemux-workflows/SKILL.md: durable task habits, worktree hygiene, and verification checks.

Because these files are seeded once and never overwritten on upgrade, you can edit them directly or manage shared skills with the skills tool (list, create, install, remove) to reshape how your agents coordinate without modifying the kernel.