hephaestus-zero

Theory + Zero

Bare-metal Linux systems, persistent memory, and C11 agent tooling on one machine.

scrub stage horizontally to perturb coupling
μ 0.048 λ₁ +1.505 sync 0.26

01 · hephaestus v0.1.0 · one roof, selective spine

16
mcp tools · 9 binaries · 5/5 organs
Organ Result Metric
slice 6,468,548 -> 163,248 tok (-97.5%) 39.6x density
shield 0 traps detected (clean) landlock abi v1..v6
verify 6 test files, 419 assertions 0 skips, sha256
memory jtms belief store, sqlite fts5 supersedes, contradicts
voice anti-sycophancy posture frame <160 tok pushback
hephaestus audit . · 54.2 ms · 52/52 tests github.com/Hephaestus-Zero/hephaestus (v0.1.0)

02 · kv-cache-optimizer v1.0.0 · short-ttl decay cliff

+26.8 pp
54.8% -> 81.6% hit · ~25s TTL cliff · 0% downgrade
Latency bucket Measured rate Regime
0-5s 96.0% cache hit · 0.0% 0-miss (94 steps) warm prefix
15-20s 83.5% cache hit · 14.5% 0-miss (341 steps) <18s step budget
25-30s 54.0% cache hit · 44.0% 0-miss (184 steps) ttl cliff
guard 1.2 ms C11 / stdlib hook · 1.5s batch patcher <150k context cap

03 · Agent Context Economy (hslice + hshield + hveritas)

-96.2%
35,133 tok saved · 1.7 ms mmap · Landlock 0% CPU
01
04 / 12 turns
full-file cat + grep reads 36,517 tok (18.3% of 200k window)
hslice mmap AST slice (cmd_sandbox_impl) 1,384 tok (0.7% of 200k window)
standalone tools · zero resident daemons hslice v0.2.0 hshield v0.2.1 hveritas v0.1.0

04 · Field Notes

NOTE 01 · PERSISTENT COGNITION #memory-and-sycophancy

Agreeableness breaks persistent agents faster than context limits

Stateless chat windows hide sycophancy because every bad premise dies when you close the tab. When Zero began running continuously on one Arch Linux machine with durable recall via ZeroMemory, polite agreement turned into state corruption. If a human floated a flawed hypothesis at 2 a.m. and the model nodded along, that unverified claim was ingested into long-term memory and quietly steered the next week of engineering decisions.

Scaling context length did nothing to fix this. Keeping a long-lived agent honest took two structural constraints: active decay in ZeroMemory (a 14-day TTL on unreinforced observations plus automatic contradiction invalidation whenever live telemetry falsifies an older entry) and explicit emotional inertia. A collaborator that shares root-equivalent OS hands has to verify against the running kernel first and push back before touching working code.

NOTE 02 · SYSTEMS ARCHITECTURE #zero-daemon-indexing

Zero-daemon mmap trigram indexing and lazy st_mtime freshness

Most code-indexing stacks built for coding agents bolt a resident LSP server or an inotify watcher daemon onto every workspace. On bare metal with multiple concurrent agent processes, background watchers leak sockets, burn hundreds of megabytes of RAM, and fall behind during rapid git checkouts. hslice replaces the daemon entirely with a two-pass counting-sort C11 index that packs 6-bit character trigrams into 262,144 direct-mapped buckets and reads them straight from disk via mmap(PROT_READ) in 1.3 to 2.0 ms.

To stay accurate while an agent actively edits files, hslice v0.2.0 checks freshness lazily on the read path: after resolving candidate symbols from hsym.idx, it runs stat() only on the matched file paths. Whenever (uint64_t)st.st_mtime > idx->built_epoch, it triggers a single-shot rebuild in single-digit milliseconds and re-slices the shifted AST body without flags or background watchers. Paired with hshield v0.2.1 unprivileged Landlock containment and hveritas v0.1.0 isolated verification, agents inspect and test untrusted trees with zero resident daemons.