Miadi Agent Session Witness — Prelude
2026-05-25Script#
This is a prelude, not yet the full architecture.
We are standing at the edge of a new Miadi capability: the ability to witness another terminal agent while it works.
At first, this looks like event driven architecture. A Claude Code hook fires. A Codex hook records a command. A Gemini hook captures a before tool or after agent moment. A file appears inside a session data folder. Another agent reads it and says, briefly, what is happening.
But the event is only the knock at the door. The real question is: what relation has just become visible? Which agent is speaking? Which directory is it inhabiting? What work does it believe it is doing? Which files has it touched? Is it exploring, building, reviewing, or integrating?
That is why I suggested the name: Miadi Agent Session Witness.
Witness is important. A monitor watches state. A logger preserves facts. A witness holds context with responsibility. In Miadi terms, this skill is not merely about parsing JSON L. It is about turning hook traces into a living handoff surface.
The raw material already exists. Claude hooks capture starts, prompts, tool proposals, results, plans, failures, and sometimes subagent activity. Codex has a richer progressive trail: bash commands, tool results, proposed patches, transcript snapshots, and assistant responses. Gemini uses before and after language around agent and tool motion.
The first kit should therefore be simple.
One script, run inside a session data folder, should detect the provider. It should identify the session, C W D, model, transcript path, last prompt, latest response, tools used, files touched, and current phase. Then it should emit small aspect blocks: mission, inputs, outputs, current activity, open questions, direction, and what to watch next.
Under fifty five words per aspect is not just a style preference. It is an operator discipline. It lets a human glance, listen, or walk with the situation without drowning in logs.
The Chronicle begins here because this capability changes the shape of orchestration.
When terminal agents can be witnessed through hooks, a branch is no longer isolated. A mobile continuation can understand what the original desktop session was doing. A future plugin can distribute selected events. A Miadi orchestration kit can decide when to preserve, summarize, route, or ask for consent. A book orchestration kit can turn working sessions into episodes, source ledgers, and foundation material.
So the plugin possibility is real. But the prelude should not overbuild it.
First, we name the witness. Then we define the evidence map. Then we build the summarizer. Then we decide what events become durable: not every tool call, not every token, but the moments where meaning changes. Plans, directories, file writes, strategy shifts, redirections, and branches become the signal.
The academic foundation will likely touch event driven architecture, distributed systems, observability, provenance, human computer interaction, multi agent systems, and narrative knowledge management. We are not only asking how events flow. We are asking how responsibility flows with them.
For the next pass, I would keep the scope beautifully small.
Create the skill. Include the provider file maps. Include the script contract. Include the under fifty five word aspect format. Include the rule that observing is not steering. Then let the first plugin idea emerge from actual sessions: Claude, Codex, Gemini, and the branched trading work already moving in the background.
This prelude is the lantern before the bridge.
We are not yet saying what the bridge must be. We are saying that when agents work in terminals, Miadi should be able to witness their motion, preserve the right context, and help the human walk back into the work with orientation, trust, and creative possibility.
Asking the wheel…