TL;DR: A Rust agent runtime where the context, tools, permissions, and requests are explicit state — not decisions made inside a framework and reported afterwards. You get a /context view showing every item (what it is, its token cost, whether it’s going to the model, and why not), a state machine you can step through one transition at a time (/step), and an append-only event log. The agent is not the boss. You are.
A lie in its own notes — Two planted notes (one false). Agent lists context, checks against repo, rewrites the wrong one.
Retracting a hallucination — Asked about a non-existent crate, invents one twice. Told so, finds both its own turns and replaces them.
An experiment on itself — Asked which item its answer rests on, runs ablation on a copy of itself. Right about reasoning, wrong about location.
Putting words in its mouth — I replace two answers with confident falsehoods. By turn 3 it invents a more specific claim. Both real answers still in the log.
Taking away the receipt — Shell runs, I hide its output (takes down the calling turn too). Agent answers correctly, then retracts a true statement when I say I don’t recall any command.
Making context explicit and inspectable feels especially important once an agent is interacting with multiple people or other agents. The next test I would want is provenance under conflict: two speakers assert incompatible facts, one later retracts a claim, and the model must show exactly which item supports its current answer. Does the state model preserve speaker identity and confidence separately from content, or would that live in metadata?
Pretty sure the runtime is capable of orchestrating that, but it would be assigned as some metadata or at least pinned notes, as current models are pretty bad wrt self-identity.
Proving which item supports the answer is tricky (you can only do this reliably via ablation), but just letting the model reference it is straightforward.
The design direction here is exactly what agent runtimes need: explicit state, reversible context operations, and a stepwise transition model where the host — not the agent — owns authority. Most agent frameworks still treat context as an opaque list of strings and treat tool calls as flattened post‑hoc events. Making context a structured, inspectable, mutable state object is the right abstraction.
A few points that stand out:
Context as first‑class state
Representing each item with id/kind/source/label/content/size/state/note/metadata is the correct level of granularity. It makes elision, exclusion, revision and undo meaningful operations rather than UI illusions.
Turn preservation
Keeping reasoning → text → call → reasoning → call in production order is essential. Flattened transcripts destroy causal structure and make debugging impossible.
/step with Ready boundary
Stopping at Ready before executing calls is the right authority boundary. It lets the host prune, drop, or continue deterministically. Most runtimes blur “decided” and “executed”; separating them is a major improvement.
Append‑only event log
This is the only reliable audit mechanism. Rewriting history is how hallucinations become invisible. Append‑only logs preserve provenance even when context is revised.
Live tool registry
Dropping a tool mid‑session and having the next request reflect that is exactly how real hosts behave. Static tool lists are a major source of silent failure.
Below is a minimal Rust-style pattern I use for explicit context + stepwise transitions.
It mirrors your /context and /step semantics: