01Layers
Four layers, and the direction of dependency is strict: a capability never reaches up into the loop, and the loop never imports a specific capability. That is what makes a capability replaceable without touching anything else.
02The one door
The browser reaches the runtime through a single WebSocket and nothing else — not a second port, not a direct call into a manager. Live views that need another protocol, such as a terminal or a VNC screen, are relayed through the gateway rather than exposed beside it.
Because the browser is usually not on the machine the gateway runs on. One door means one forwarded port; an address that leaks — a container's ephemeral VNC port, a sandbox upstream — is an address that works on the developer's laptop and nowhere else.
A command is {id, method, params, protocol_version}. The version is checked before the method is looked up, so a newer client cannot half-succeed against an older server.
03The step loop
One step is: assemble what the model sees, ask it, dispatch what it asked for, record what came back. The loop itself does not grow — new behaviour attaches to the points marked below rather than adding a branch here.
"Dispatch" includes a step that looks like bookkeeping and is not: before a tool that may change anything, the log is flushed to disk. Events are queued, so the log trails the run — and a run killed inside that lag leaves no record of the command it was about to execute.
04The log, and its two readings
Everything a run does is appended to one log and nothing is ever deleted. But what the model's history says does shrink — compaction folds a run of records into a single summary. Those two facts are reconciled without losing anything: each event declares how it joins the history.
05The evolution cycle
A finished run is not only an answer. It is a reward-annotated record of what was tried, and that record is what a later round improves a component from. The cycle is deliberately gated at every point where a bad component could reach the next session.
06What stops it
An agent that writes and mounts its own code needs limits that are not advice. These are the ones that refuse rather than warn.
| Limit | What it refuses |
|---|---|
| Permission modes | A read-only agent cannot call a framework-mutating tool at all — the denial is tested through the executor, not by omitting the tool from a prompt. |
| Budgets | Step, token, and wall-clock ceilings stop a run rather than letting it spend. A stop is reported as a stop, never as a completed task. |
| Promotion containment | A component is promoted only from inside the session's staging root, checked after both paths are resolved — so .. and symlinks cannot spell a way out. |
| Plan mode | Holds a run to reading and reasoning until a person approves what it intends to do. |
| Sandboxing | Commands run inside the session's sandbox, with the filesystem fenced by its mode. |