DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path inspection-briefs/loomworks-w6-step-0-inspection-brief-v0_1.md

Loomworks — W6 Step 0 Inspection Brief — Writing the Grant Into the Record — v0.1

Version: v0.1 Date: 2026-08-20 Status: Step 0 inspection brief. Read-only. No CR may be drafted from W6 until this reports. Markdown primary — the consumer is Claude Code. Occasion: H0's state report records acceptance 4's first half as false — no action carries the session id into the record. It travels to the chokepoint and is discarded; AgentDecision.session_id is populated by nothing. Reads with: standing-notes/loomworks-standing-note-agent-accountability-v0_1 (STANDING, 2026-06-14); standing-notes/loomworks-standing-note-operational-identifiers-are-not-audit-trail-facts-v0_1 (STANDING, 2026-08-08); current-status/loomworks-h0-state-report-v0_1.


Plain-language summary

H0 built a gate that will not let an agent act without a session, and then nothing writes the session down. The enforcement is real. The record of it is not there.

Two ratified standing notes turn that from a gap into something with a clock on it. One commits that every agent action records what authorized it, non-suppressibly and by construction. The runtime does not currently do that. The other rules that attribution cannot be backfilled — only values recomputable from the log can be. A session id is not recomputable from the log. So every agent action taken between now and the fix is permanently unattributable to its grant. This is not work that can be deferred at a constant cost; the cost accrues while it waits.

This brief does not design the fix. It asks Claude Code seven questions about what is actually there, so a change request can be written against facts rather than against this document's assumptions.


1. The conflict, stated plainly

loomworks-standing-note-agent-accountability-v0_1 is STANDING and settled. Its §1:

> Every agent action carries a responsible human, and that responsibility is auditable (the action records who acted and what authorized it) and discoverable... This holds by construction — the system cannot produce an agent action without it — not by policy that could lapse.

And §6, among the invariants the agent work must preserve:

> Actor attribution with the capability reference must remain on every agent action, non-suppressibly.

W2 built the grant. A session is requested, granted, and short-lived; it is what authorizes an agent's work. In the vocabulary of the 2026-06-14 note, the session is the thing the capability reference points at.

The runtime enforces the grant and does not record it. The session id reaches the spend chokepoint and is discarded. So the current position is:

This is a conflict between the runtime and a ratified commitment, not a missing feature. It is raised here rather than absorbed into a CR's scope section because that is what the standing note asks for.

2. Why the cost accrues rather than waits

loomworks-standing-note-operational-identifiers-are-not-audit-trail-facts-v0_1 permits backfilling an identifier into existing payloads — and draws its boundary explicitly:

> It does not cover content, state, commit facts, attribution, or any value that is a judgment rather than a computation. > > The test is can the value be recomputed from the log, and would it have been the same value had the field always existed.

A session id fails that test. Which session an action ran under is not derivable from the log after the fact — the session existed for a window, the action happened inside it, and nothing outside the moment records the pairing. There is no ROW_NUMBER() that reproduces it.

So the gap is not repairable later by any means that note permits. Agent actions occurring before W6 lands are permanently unattributable to their grants. That is worth naming precisely: not "we will add the column later and populate it," but "these actions will never carry it."

Whether that matters depends on what runs between now and then, which is a fact the inspection should report rather than assume — see question 7.

3. What W6 is, as currently understood

Understood, not settled. The CR settles it.

Writing into the record, at the moment of the act: which session an action ran under, and the session's own lifecycle — minted, closed, refused, silent — so a session's story reads grant → actions → end rather than grant → end.

A convergence worth naming. The six anchor-priority entries with no writers — agent_session_minted, agent_session_closed, agent_session_refused, agent_identity_minted, agent_identity_frozen, agent_session_silent — were pre-registered under O7 while the emitter sleeps. W6 is the change that gives them writers. They are not drift; they are W6's output, registered ahead of it. The FORAY R-2 note's §4d already says do not clean them up. This is why.

4. The questions

Read-only. Report; do not fix, do not design, do not draft.

Q1 — AgentDecision. Where is it defined, where is it constructed, and where does it persist? session_id is populated by nothing — is the field present and unwritten, or absent? Who reads it today, if anyone? Is AgentDecision a persisted row, an in-memory object, or both?

Q2 — what the record's actor reference actually carries. The 2026-06-14 note describes an ActorRef carrying kind, id, and a capability reference for a delegated action. Does a capability-reference field exist in the current schema and payloads, or is that aspirational? If it exists, is it populated anywhere? If it exists and is empty, W6 may be filling an existing seam rather than cutting a new one — that changes the shape of the work considerably.

Q3 — the write path from the chokepoint. At the spend chokepoint, what is in scope at the moment of the act — agent identity, session id, engagement, room — and what of that reaches a persisted row? Trace from the gate to whatever actually writes. This is the same discipline as the FORAY forward-gap census: what is available versus what survives.

Q4 — the session lifecycle events. Do mint, close, refuse and the silent-session sweep currently write anything to the record? W2 and W4 built the transitions; the state report implies they are not recorded. Confirm, and report where each transition happens so the CR can name its locations.

Q5 — what a session's story looks like now. Query the live dev database: pick a session from the traversal test's run, and report every record row that mentions it. The state report says grant → sign-out with nothing between. Confirm against data rather than inference, and report exactly what is there.

Q6 — where session events would land. memory_events via append_event, agent_sessions rows read as a log, or somewhere new? Report what exists; do not choose. Note whether append_event's signature accommodates a session id today or would need widening — and if widening, what else calls it.

Q7 — how much is accruing. How many agent actions have run through the spend chokepoint in the dev database to date, and at what rate? This is the only question whose answer bears on sequencing rather than shape: if the answer is a handful of test runs, the accrual argument in §2 is theoretical for now; if agents are working continuously, it is not.

5. What this brief does not do

It does not design W6. It does not decide where session events land, whether the capability reference is the right vehicle, or whether session lifecycle and per-action attribution are one change request or two. It does not rule on sequencing against the other queued items. And it does not assume the standing note's ActorRef description matches the current schema — Q2 exists precisely because a 2026-06-14 document describing code is exactly the kind of document this arc has twice found to have drifted.

6. After this reports

The CR is drafted against the findings, carrying its O1–O10 screen line and citing the two standing notes above. If Q2 finds the capability-reference seam already present, the CR is smaller than expected and should say so. If Q7 finds material accrual, that goes to the Operator as a sequencing input, not as a reason for the CR to grow.


DUNIN7 — Done In Seven LLC — Miami, Florida Loomworks — W6 Step 0 Inspection Brief — Writing the Grant Into the Record — v0.1 — 2026-08-20