Expand description
Start-then-deliver (docs/specs/SPEC_ALWAYS_AVAILABLE_AGENTS_2026_10_27.md ยงD4, P2b): with
agents:always_available on, a message that finds its agent stopped starts it instead of only
waiting for someone to open it.
- A held message (
HoldReason::NotRunning):hold_with_reasonhas already kept the row, and only a host-tier, full-key sender gets that far (hold_applies), so a LAN or WAN peer or an unverified sender never starts an agent. The start runs in the background; the replay delivers the row when the agent registers (jekt_held). - An operator Job or cron fire, which is never held:
deliver_cronstarts the agent first, waits for it to register and then delivers.
Admission, the spawn gate and the lease apply as for agent.open; a start that fails leaves the
message held (or the fire missed) exactly as before.
Structsยง
Enumsยง
- Held
Start ๐ - What became of the start a held message asked for.
Constantsยง
- REGISTER_
POLL ๐ - REGISTER_
WAIT ๐ - How long a Jobโs fire waits for a started agent to register before it is missed.
Functionsยง
- deliver_
cron ๐ - Deliver a Job or cron fire. With the setting on, a target that is an agent of this instance and runs nowhere is started first and waited for, then the fire goes the normal way: before this, a signed-in instance would have queued the fire to the cloud as delivered while the local agent stayed stopped.
- enabled ๐
- Whether a stopped agent is started by a message (the
agents:always_availablesetting). - make_
addressable ๐ - A started agent that has never run (no session to resume) has a controller that spawns on its first turn and registers for delivery only then, and there is no pane to send that turn. Register it here, so the replay (or a Jobโs fire) reaches it and the delivery starts that turn.
- may_
start ๐ - Whether the sender may start an agent: not one whose signature failed (
sig_verifiedisSome(false)only for a sender that has a key and did not prove it). The holdโs own test (hold_applies) has already kept LAN and WAN callers out. - name_
the_ ๐proof - Name who a scheduled fire runs for, from the agentโs own record here: the marker shows that name, never one a request carried. An agent that no longer exists here names no one, so the fire goes unproven.
- sender_
key ๐ - Whose starts per minute a message-started agent counts against: the senderโs uid, which its token
attributed (the same key
Agents startuses, so one agent has one budget across both paths), else the name it sent as. - start_
for_ ๐held - A message was held for the stopped agent
target_uid: start it in the background unless a limit would refuse it. The row stays held and the replay delivers it once the agent registers, so a failed start loses nothing. - start_
once ๐ - Start the agent
uidforsender_keyunless it is registered or a start is in flight. A start that goes ahead counts against the senderโs starts per minute (start_rate); a no-op does not. - start_
stopped_ ๐local_ target - Start the agent
targetnames when it is defined here and runs nowhere (not here, not in another channel on this computer, not by a lease held elsewhere), and wait for it to register. - starting ๐
- Agents with a start in flight, so a burst of messages makes one start.
- starts_
the_ ๐agent - Whether a message to an agent with no process starts it: the shared decision (
Intent::Start) for a stopped agent,allowedbeing the setting and the sender. Every caller has already found the agent absent (held asNotRunning, or not registered anywhere), so that is the status it is asked about. - wait_
registered ๐