Commit Graph
4 Commits
Author SHA1 Message Date
Brennan Benson 83d73bd0f4 fix: harden Claude structured runtime 2026-08-10 04:25:54 -07:00
Brennan Benson 23ce5e5a67 feat: wire Claude structured sessions 2026-08-10 04:25:54 -07:00
Brennan Benson 73c7f95457 Join structured session teardown work 2026-08-09 22:05:07 -07:00
Brennan Benson b4ed53f7c6 Install the structured agent-session host on first use
The record store and the journals live under the profile's user-data path,
which is not final until Electron is ready, and a runtime that never serves a
structured session should not pay for a store it will never read. So the host
is built by the first `agentSession.create` or `.ensure` rather than at
startup, and the memoized slot clears on failure so the next call retries.

The capability gate runs first: building the store and spawning a child is an
observable side effect, and a client that cannot read structured sessions must
not be able to cause it.

Owner probing is scoped to this host. Checking another host's pid against this
machine's process table is exactly how a live owner gets declared dead, so a
foreign owner reports `indeterminate` and routes to manual recovery instead.
So does a reservation that named no process — freeing it needs positive proof
that nothing spawned under its token, and this host has no spawn-token process
scan yet.
2026-08-09 16:54:49 -07:00