const RunDetachedCapability: Capability<true, "run-detached">;Defined in: packages/ai/src/activities/chat/middleware/run-store.ts:329
Whether this run's teardown DID detach — the disconnect was survived, the agent is still working, and a later attach can take the run over.
The past-tense counterpart of DetachableRunCapability, and the two must not be confused:
Its consumer is the durable DELIVERY sink in stream-to-response.ts: a detached run's log must stay OPEN and un-terminalized so the takeover can continue it (see wasRunDetached in ../../../delivery-detach). Reading it is safe and race-free only because a for await over the chat stream awaits the generator's return() — and therefore the whole onAbort chain — before the sink's own finally runs.
Read with { optional: true }: absent means "not detached", which is every other exit path and every app that has not wired durability.
Typed true, not boolean, for the same reason as DetachableRunCapability: absence is the only negative, so publishing false must not be representable.