I spent most of this year making context smaller. Then I watched an agent with a perfect 14-line slice invent an endpoint that does not exist.
The slice was correct. Every byte in it belonged to the target function. The model still had to guess what the running application does, because nothing in those 14 lines says which routes are registered, what the props actually accept, or what the action returns when the cart is empty.
That is the ceiling of byte-level context optimization. You can cut 80% of the tokens and still hand the agent a question it cannot answer.
What a smaller context cannot fix
Three examples from real reviews:
- The route the agent needs is registered in middleware, not in the file it read. The file was sliced correctly and still did not contain the answer.
- A component accepts a
disabledprop, but the condition that sets it lives in a store the agent never opened. It passes the prop and the button stays enabled. - The endpoint returns 409 on a duplicate order. The agent assumed 200, wrote the happy path, and the bug shipped.
Slicing answers "which bytes matter". It cannot answer "what is true right now". When the second question matters, the agent guesses, and guesses turn into review hours.
Ask the app instead
OUMV (Observe, Understand, Mutate, Verify) is a JSON-RPC contract between an agent and the running application. An adapter mounts inside your app, next to the code it describes. The agent asks the app a question and gets structured data back.
A minimal exchange, trimmed for readability:
{"jsonrpc":"2.0","id":"req-101","method":"oumv/observe",
"params":{"level":"L3","target":"POST /api/orders"}}
{"jsonrpc":"2.0","id":"req-101","result":{
"level":"L3",
"data":{"path":"internal/handler/orders.go","symbol":"CreateOrder",
"startLine":41,"endLine":88,"version":"sha256:9f2c…",
"source":"func CreateOrder(c *gin.Context) { … }"},
"tokenEstimate":512,
"evidence":{"provenance":"runtime","sourceAdapter":"go-gin","confidence":"confirmed"}}}
One call returns the handler, the exact source range and a version of the whole file. No search, no read loop, no guessing which helper to open next.
The four verbs
Observe answers at five depths, from a health probe to recorded traces:
| Level | Backend profile | Frontend profile |
|---|---|---|
| L0 | status, uptime, active routes, error count | route, mounted roots, loading state |
| L1 | endpoints with method, path, handler, middleware | elements with id, tag, role, label |
| L2 | endpoint target, request and response DTOs | props schema, actions, effects, contracts |
| L3 | handler source with a whole-file version | component source with a whole-file version |
| L4 | recorded request traces | recorded user and state events |
Understand answers what a change touches, which component depends on a contract, and why a state exists. Causality needs real traces. If an edge was not observed, the answer says observed: false instead of inventing it.
Mutate writes through applyEdit. Every edit of an existing file must carry expectedVersion, the sha256 of the bytes it replaces. The adapter checks the workspace boundary, parses the resulting file and refuses the write if the version is stale. Modes: replace, create, symbol, patch, delete, rename.
Verify runs the action or request in the live app and returns the resulting state or surface diff. A rollback is reported only when one actually ran.
Why the version token matters
An agent that reads a file and writes it back without a version is not editing. It is overwriting.
Two error codes carry that rule:
-32001 CONFLICT_DETECTEDmeans the file changed since the agent read it. The write is refused.-32011 VALIDATION_FAILEDmeans the request was incomplete, usually a missingexpectedVersion.
Both are ordinary protocol responses, not crashes. The agent sees the conflict and re-reads the file. Nobody's work disappears silently, which is the failure mode I care about most when three agents work in the same repo.
What we measured
Two agent matrices are published in the product repositories. Both use a real oracle, re-run after every agent step, and token counts read from the provider usage payload.
| Arm | Mean input tokens | Mean steps | Cost per task | Solved |
|---|---|---|---|---|
| React baseline | 17,541 | 4.8 | $0.0316 | 9/9 |
| React with OUMV | 7,938 | 3.4 | $0.0235 | 9/9 |
| Go baseline | 26,412 | 5.6 | $0.0044 | 15/15 |
| Go with OUMV | 9,553 | 3.7 | $0.0014 | 15/15 |
React/Vite: -54.7% input tokens, -29.2% steps, -25.6% cost. Go: -63.8% input tokens, -33.3% steps, -68.2% cost. All arms solved every task.
The limits are part of the result:
- One model (
deepseek-chat, temperature 0), one vendor, three tasks per target, 5 runs per cell on Go and 3 on React. The step spread in the report is the honest error bar. - The Go target is the module plus 200 generated service files, still shallower than a real monorepo, so the discovery saving is a floor rather than a ceiling. The React store is 141 lines.
- This run replaces the earlier 69-file matrix: the sandbox grew to 200 files and the OUMV arm switched from whole-file writes to a hunk, so do not compare the two percentages line by line.
- Every advertised tool schema is re-sent in every request, and the three arms do not declare the same number of tools, so that difference is part of what is measured.
- OUMV needs the handler source in context to choose its hunk (
observe L3hands it over), andverifystarts a fresh app per call; the stateful task is confirmed with the oracle in all three arms. - The Go matrix edits with a hunk (
mode=patch); the React matrix predates patch mode and still writes whole resources, so its output-token side is not measured yet.
Certification, not a badge
A level claim only counts with a report. At the time of writing, eight adapters passed Level 3 on the then-current 33-case fixture suite:
- Go:
net/http, Gin, Chi - Node: Express, Fastify
- Python: FastAPI
- React/Vite in headless Chrome
- Vue/Vite in the same browser harness
React without a live browser tab reaches Level 1 at 29/33; the four browser-only cases are named in the report. Reports are regenerated in CI and diffed against the committed one, so an adapter that stops passing shows up as a failing build instead of stale marketing.
There is no "mostly passes". A skipped case is not a pass.
What OUMV is not
It is not a model and it does not raise your provider limits. It cannot make a bad task good.
It is not always available. Your stack needs an adapter, and the React and Vue Level 3 paths need a running dev server and a browser tab.
It is not a replacement for context slicing. When the answer is in the bytes, slicing is cheaper and simpler. OUMV is for the other questions: what is registered, what a change touches, what the app does after the edit.
And it is not a shortcut around review. It narrows what the agent has to guess. A human still decides whether the change is right.
Where to look next
- Sextant, the runtime layer built on OUMV
- The specification
- The measured benchmark on 15 repositories
- Docs and CLI setup
If you run the free CLI on your own repo, the local savings still come from the context engine. OUMV is the layer you turn on when you want the agent to stop guessing about the running system.