01

Akuma OS

AI will write 600 bugs
and I will write 600 more

at some point you gotta do some real engineering

Meme: an older man holding out a cigarette, captioned "Your ancestors need you to lock in son."
the operative engineering principle
02

699 documented, dated, fixed

The checks got cheap too

More code generated means more code to check. But the same shift that made the code cheap makes the checks cheap — probes, tripwires, self-tests, boot suites, A/B runs on real workloads, all cheap enough to write per-bug and leave in place.

So the checks stop being a budget item you ration, and start being the default response to every commit.

03

Act I · the landscape

What is Akuma?

Bare-metal AArch64 kernel in Rust, no_std: preemptive scheduling with shared-kernel SMP, per-process address spaces with demand paging and CoW fork, dynamic libraries, ext2, smoltcp networking stack, limited Linux binary compatibility, runs Docker images like redis:alpine. Comes with apk and Go 1.26.3, Rust and Cargo (stable and nightly), clang / gcc / tcc, git, Bun.

Runs on QEMU and AWS, verified on m6g.metal — Graviton2, 64 cores — under Firecracker v1.16.1 on KVM, answering SSH from across the internet.

A developer oriented operating system inspired by early 2000s experience, with modern tooling. The first program written for Akuma inside Akuma was written by GLM-4.7 on 22 Aug 2026.

43,700prod lines
29,302test lines
~170linux syscalls
699documented fixes
04

Act I · the landscape

Competitive landscape

RedoxAsterinasAkuma
since2015~20222026
peopleteam + nonprofit50+, 3 universities1
fundingEU NGI grantsAnt Group + Intelnone
high-waterCOSMIC desktop, packagesnginx faster than Linux, Firefox, Redis at paritynginx, Redis + official image, Go, rustc, llama.cpp
runs onreal hardwareQEMU, cloud VMs — in production at Alibaba CloudQEMU · Graviton2 metal, Firecracker/KVM
builds itselfnot yetundocumentedyes

Asterinas is the one worth studying. A framekernel: all unsafe is confined to one library (OSTD, ~15k lines, 14% of the kernel — about the size of seL4's verified core), so every service above it is written in 100% safe Rust. They verify that tiny TCB for memory safety, then reach for model checking and tests for everything past it. Logic-level verification is explicitly aspirational.

Measuring against Linux and against them is good practice — a better reference turns “this feels slow” into something to go fix. It is where a lot of this work came from.

05

Act I · the landscape

Same pressure, opposite answers

AI-contribution policy
RedoxBanned, Feb 2026, enforced — LLM-labelled contributions closed on sight; bypassing it is a project ban
AsterinasWelcomed and automated — “AI is welcome, but the human is responsible”; ships an AI PR-review bot
AkumaNo policy

Same pressure — generation outpacing review capacity. Two structurally opposite answers, both from funded, multi-institution projects.

Both policies legislate who writes the code. Neither addresses who keeps it.

06

Act I · the landscape

the bugs

699documented fixes
43,700prod lines
29,302test lines
355investigation docs
subsystemfixes%/kLoC
Syscall / ABI12822.3%20.5
Memory & VM11319.7%23.3
SMP & Locking8715.2%41.8
Scheduler & Process7613.3%6.9
Networking549.4%9.3
Containers244.2%21.5
Boot & Drivers234.0%6.0
Misc / cross-cutting223.8%58.7
VFS & Filesystem173.0%4.2
Console & Terminal162.8%16.6
Signals & Exceptions132.3%3.8
kernel573100%13.1
outside it — apps, toolchain, ssh, rump126——
07

Act II · the workflow

Have a concrete goal: run X

Compatibility with X, in order to run X.

targetwhat it forced
redis/proc/<pid>/*, MADV_FREE honesty, TCP connect-state, short-write writev
rust / cargoMAP_SHARED writeback, 128 KB argv, thread-group reaping, getpriority
golangsignals on a foreign signal stack, pidfd, waitid parentage, fork/exec
llama.cpplazy mmap, file-page eviction, heap-growth headroom
nginxzero new syscalls — then three kernel defects behind "stops answering after enough traffic": a stubbed shutdown(2), listener-backlog exhaustion, socket reclaim

A real program is a specification you didn't write and can't argue with.

08

Act II · the workflow

Self-hosting: it compiles itself

Cloned from GitHub and built inside Akuma, on a nightly musl toolchain:

~ # git clone https://github.com/netoneko/akuma.git \
             && cd /tmp/akuma && cargo build --release
20/20clean builds, first try
107–128 sper trial, in-guest
3.8 MBelf · it boots

Almost no hobby operating system gets to self-hosting. Redox reached running rustc and cargo natively in January 2026 — a decade in, on the third attempt — and does not yet build itself. Asterinas hasn't published a self-build result — with 210+ syscalls, Firefox and QEMU running, rust/cargo probably work as clockwork.

Twenty consecutive first-try builds. A failed clean build is a clear regression finding.

09

Act II · the workflow

Audit before touching code

Update the references and the diagrams first. Then reason about where the problem could be.

  • Re-measure the project's own headline numbers. One audit opened by knocking a claimed 88.8% down to 23.0% — the gap was a bug in the profiler.
  • Standing rule: never trust a percentage without re-measuring.
  • Enumerate the candidate theories explicitly, before writing any code.

Updating the docs is how you find out your mental model and the code have diverged.

10

Act II · the workflow

Isolate theories with probes, then discredit them

Build the smallest thing that can tell two theories apart. Kill theories until one survives.

Adding instrumentation and tracking the data flow is always worth it. Where a value came from, who owns it, when it was freed — that work pays off even when the theory it was built for dies.

Probes inspect state, not behaviour. Keep the good ones; leave them armed.

The bug is almost never where the error appears.

11

Act II · the workflow

Then A/B it on real workloads

Any change to architecture or implementation detail triggers an A/B spree — on real software, once the probes pass. Same binary, one variable, zero tolerance.

  • host unit tests for the logic
  • a boot self-test hitting the real entry point
  • same-binary A/B stress on real workloads — in-VM rustc -j4, Go fork/exec stress, Redis, a container pull

Any stuck / RECOVERED / PANIC / WILD / SPURIOUS marker fails the run.

Remember, the tests were written by the AI who wrote the bug, and someone signed off on them.

12

Act III · how it's built

AI-assisted development: build your intuition

LLMs are stateless, engineers aren't. Good intuition indicates a strong mental model.

Documenting the development process and helping the LLM discover the context by itself is cheap and always pays off.

tierjob
runbooks/do X, expect Y — ends in Verify
reference/current state only, each page graded A / B / C for how far to trust it
archive/340 investigations, verbatim, never rewritten — including the wrong theories
agent contextthe standing rules, so they're never re-litigated

Written to reconstitute project-specific intuition in a reader who starts from zero.

The failure mode this guards against, logged once in the archive: during what should have been a mechanical port, two syscalls were rewritten instead of copied — breaking an ABI. Caught and reverted. There is no way to know how many similar substitutions weren't.

13

Act III · how it's built

Learn from history

A full OS development cycle is a surprisingly large dataset. 2,039 commits, 355 investigation docs. What can be mined:

  • 699 distinct fixes across 15 subsystems, itemised, dated, cross-referenced.
  • Two crisis windows, from commit volume alone — an independent churn-per-file measure lands on the same two months.
  • Recurring defect types. ~3% of all fixes are the same underlying bug rediscovered in a different subsystem: stale address-space pointer ×3, lock-held-across-blocking ×4, readiness gaps ×6 across four files. The most-repeated shape: a raw index outliving the thing it names.
14

Act III · how it's built

Clean up after yourself

Generation is cheap, so the default move is a second copy. A clone detector over the kernel found 5,370 duplicated lines — 5.6% of the tree, and that is the floor, not the estimate. What the copies cost:

written more than oncecopieswhat it cost
the CoW break path, exceptions.rs3a refcount underflow in the page-fault path — frames freed while still mapped. Three separate fixes
X and X_from_path, down a whole call chain4 pairsa second, hand-rolled ELF parser — which one validates your dynamic linker depends on which execve path ran
the bounded channel write2the stream-truncation fix landed on stdout, never on stdin
errno tables5-12 (ENOMEM) returned under a comment reading ENXIO. 116 definitions → 39
the runtime-registration pattern3every network poll took a spinlock to read a function pointer
production logic, re-typed inside its own test13the test exercises its copy, so production drifts for free — plus 25 more that assert true == true
Meme: a cat wearing a necktie stands outside a factory labelled "out of touch slop factory", saying "I hope I don't see any out of touch ai slop."
the audit, arriving on site

“Coding is solved.”

— some guy with a $2T company
15

Act III · how it's built

mood

2025-11-28  does not actually detect ram
2025-11-28  at least it still runs
2025-11-30  allocation is the root of all evil
2025-11-30  this is clearly getting out of hand
2025-12-27  aaaaaaaa CAT
2026-01-21  at least it boots
2026-04-02  god damn it x2
2026-04-03  why are we here? just to suffer?
2026-08-06  more tests and fixes, cargo remains undefeated
2026-08-11  curious case of nothingburger
2026-08-13  java crossover episode
2026-08-21  lmao lost networking but how
2026-08-21  hell yeah graviton

Time honored Eastern European tradition: curse, complain, then complain some more, still do the job.

16

go build defeated

akuma:~$ apk add go git
akuma:~$ git clone --depth 1 .../akuma-playground.git
akuma:~$ cd akuma-playground && rm -f *.c *.rs
akuma:~$ CGO=0 go build -v .
akuma:~$ ./playground
Hello from Golang on Akuma
1.26.3go, from apk
112 scold build · 38 pkgs
14 swarm rebuild
2.3 MBbinary · runs

The milestone table said "in progress — crashes during compilation" for five months.

Pick a real program. Audit before you touch anything. Probe until a theory dies. A/B on the real workload. Write it down for whoever starts from zero tomorrow.

LLMs are statistical engines and it is your job to turn the stats in your favor.

17

and it did not stop

Another week, another 100

62217 Aug · deck rendered
69925 Aug · today

The previous version of this presentation was finished a week ago. Another 77 bugs have been documented and fixed yet I am sure there will be more than I can imagine.

Conclusion: try to avoid rolling your own operating system.

↑ ↓ to navigate