Agent exit on a node is only observable by polling the roster: deregisterAgentViaNode (engine/src/engine/node.ts) and reconcileInventory's missing-agent sweep flip the agent row to offline without emitting any workspace event, completing any invocation, or touching the webhook outbox. Consumers that need exit signals (e.g. the factory orchestrator's remote backend) run a reconciliation poll instead.
Emit agent.exited (with agent_name, and the spawn correlation available in metadata.fleet.{node_id, invocation_id}) through the same fanout as invocation completions — durable workspace event log, webhook outbox, and the spawn caller's mailbox — from:
deregisterAgentViaNode
- the
reconcileInventory missing-agent sweep
applyReleaseCompletionEffect (release round-trip)
Node death itself is also push-invisible (sweepOfflineNodes only decays liveness): a durable node.status.offline/online pair would let dispatchers stop corroborating node liveness by polling.
Downstream: the factory replaces its roster-reconciliation exit watcher with an event fast-path once this lands and the hosted engine is on a version that carries it.
🤖 Generated with Claude Code
Agent exit on a node is only observable by polling the roster:
deregisterAgentViaNode(engine/src/engine/node.ts) andreconcileInventory's missing-agent sweep flip the agent row to offline without emitting any workspace event, completing any invocation, or touching the webhook outbox. Consumers that need exit signals (e.g. the factory orchestrator's remote backend) run a reconciliation poll instead.Emit
agent.exited(withagent_name, and the spawn correlation available inmetadata.fleet.{node_id, invocation_id}) through the same fanout as invocation completions — durable workspace event log, webhook outbox, and the spawn caller's mailbox — from:deregisterAgentViaNodereconcileInventorymissing-agent sweepapplyReleaseCompletionEffect(release round-trip)Node death itself is also push-invisible (
sweepOfflineNodesonly decays liveness): a durablenode.status.offline/onlinepair would let dispatchers stop corroborating node liveness by polling.Downstream: the factory replaces its roster-reconciliation exit watcher with an event fast-path once this lands and the hosted engine is on a version that carries it.
🤖 Generated with Claude Code