Preface
2026.08.10This book is divided into six parts. Parts 1-5 answer the "how" — from philosophical foundations to runtime kernel, self-evolution, autonomous operation, and engineering practice. Each chapter starts from a universal problem, proceeds to CodeCoder's specific implementation, and concludes with a trade-off discussion of rejected alternatives. Part 6 is an independent essay collection answering the "why" — exploring fundamental questions about agent identity, architecture, and safety in standalone essays.
Part 6 and Parts 1-5 are complementary, not sequential. Part 6 stands alone — you do not need to read it to understand Parts 1-5. But if you read all of them, you will see the correspondence between "why" and "how":
| Part 6 | Parts 1-5 |
|---|---|
| Chapter 1: Filesystem as Self | Chapter 2: Filesystem as Self |
| Chapter 2: Three-Part Architecture | Chapter 6: Three-Part Architecture |
| Chapter 3: From REPL to Operating System | Chapter 3: Event-Driven and Message Model |
| Chapter 4: Self-Modifying Trust Boundary | Chapter 9: The Self-Authoring Safety Loop |
| Chapter 5: Graph Before, Tree After | Chapter 10: Work Graph |
| Chapter 6: With User vs. Without User | Chapter 12: Headless Autonomous Operation |
| Chapter 7: Acceptance Gates | Chapter 11: Objective Acceptance Gates |
| Chapter 8: Forgetting | Chapter 13: Context Compaction |
| Chapter 9: Identity Statement | Chapter 1 + Chapter 2 |
Every essay chapter has a corresponding engineering implementation. But Parts 1-5 are not a "footnote" to Part 6 — they tell their own complete engineering story.
Target Audience
The technical volume is for:
- Engineers and architects designing or building autonomous agent systems. Readers will find complete architecture decision records here — including rejected approaches and abandoned paths, which are often more instructive than the "final solution."
- Technical professionals interested in AI safety. Chapters 4 (permission model), 9 (self-authoring safety loop), and 11 (acceptance gates) cover trust design for self-modifying systems.
- Developers seeking agent system testing and debugging strategies. Chapters 15 (observability) and 16 (testing strategy) cover the unique challenges of agent systems.
Prerequisites
- Rust experience: The code examples in this book are Rust pseudocode. If you know Rust, you can read them directly. If you don't, the examples focus primarily on type definitions and control flow — the structure is clear and does not rely on deep syntactic knowledge.
- Agent fundamentals: You should know what LLM tool calling is, what a system prompt is, and what a context window is. Expert knowledge is not required.
- Unix/Linux fundamentals: Chapter 12 (headless operation) and Chapter 14 (daemon-client architecture) involve Unix sockets, process signals, and daemon processes. Basic Unix knowledge is helpful.
Reading Path
The book has six parts, designed to be read sequentially or browsed by interest:
- Part 1 (Philosophical Foundations): Chapters 1-2. The foundation of the entire book; recommended to read first.
- Part 2 (Runtime Kernel): Chapters 3-5. If you are interested in the agent kernel's event-driven model, tool system, and sub-agent mechanism, jump right in.
- Part 3 (Self-Evolution): Chapters 6-9. If you are interested in how an agent can safely self-extend, start with Chapter 6.
- Part 4 (Autonomous Operation): Chapters 10-13. If you are interested in headless operation, acceptance gates, and context compaction, skip directly to Chapter 10.
- Part 5 (Engineering Practice): Chapters 14-16. These chapters are relatively independent and can be read at any time.
- Part 6 (Essays): Chapters 1-9 (independently numbered from previous parts). Standalone essays exploring fundamental questions about agent systems. Can be read at any time.
About CodeCoder
CodeCoder is an autonomous AI agent system written in Rust, open-sourced on GitHub. At the time of writing, CodeCoder contains 31 source files, 26 built-in tools, 481 tests, and 31 Architecture Decision Records (ADRs). All numbers in this book correspond to CodeCoder's codebase state as of July 2026.
The code examples in the technical volume are pseudocode — compared to the actual source code, they omit error handling details and edge cases to highlight core design logic. If you need to see the full implementation, you can find the corresponding modules in the CodeCoder source repository.
It should be noted that the engineering judgments in this book were not produced in isolation; their underlying framework derives from this site's RC theoretical system (Process Realism: Observational Convergence and the Generation of Certainty): an agent's identity, knowledge, and capabilities are treated as secondary constructions on disk that can be continuously re-observed, corresponding to the ontological claim that "determinacy is a temporary locking of observational convergence." The Skill draft-promotion mechanism and the three-tier acceptance gates are the engineering unfolding of the epistemological principle of "procedural completeness" — capability converges progressively across specification, generation, testing, and telemetry rather than being designed once and for all. The ceiling rule and the "writing is cheap, execution is expensive" gate draw on the practical-theory notion of "sustainable decision-making": the goal of safety design is not to generate the single uniquely correct answer, but to exclude known bad paths and preserve the usable margin of "one more round is still possible." Readers interested in the philosophical foundations can trace them back through that entry point.
Now, starting from the first question: Why is building autonomous agents so difficult?