pub struct WorkerStatus {
pub label: String,
pub charter: String,
pub status: WorkerLiveness,
pub session_id: String,
pub slot: SessionSlot,
pub spawned_at: SystemTime,
pub spawned_by: SessionSlot,
pub diagnostic: Option<String>,
pub heal_attempt: Option<u32>,
pub heal_next_at: Option<SystemTime>,
pub activity: Option<SessionLifecycleState>,
}Expand description
Snapshot of one worker. Carried by agents__list and threaded
through SessionUpdate::WorkerStatusChanged for a view to render.
Fields§
§label: String§charter: String§status: WorkerLiveness§session_id: StringThe session id the worker currently runs under.
slot: SessionSlotThe slot the worker fills, which is what addresses it.
spawned_at: SystemTime§spawned_by: SessionSlotThe slot of the caller that issued the agents__spawn call.
In v1 this is always the project’s lead; field exists
pre-baked for v2 worker-spawn-from-worker (currently gated).
diagnostic: Option<String>Human-readable failure reason when status == Failed (the
first line of claude’s stderr, or the error variant name when
stderr was empty). None when the worker isn’t in Failed
state or no diagnostic could be captured. The Projects pane
renders this as a dim sub-row beneath the worker label so the
user can tell at a glance whether the failure is recoverable
(e.g., “No conversation found” -> fresh spawn flow kicks in)
or terminal (e.g., spawn binary missing).
heal_attempt: Option<u32>Which heal attempt is next when status == Restarting: 1 for the
first restart after the death. None for every other status.
heal_next_at: Option<SystemTime>When that attempt fires. None when no attempt is scheduled.
activity: Option<SessionLifecycleState>What the worker’s session is doing right now, on the axis
status does not answer: status is the spawn outcome and
stops moving once the worker connects, so a worker idle for an
hour still reads Running there.
None means this path does not derive activity, not that
activity is unknown - do not project a state from it. The only
producer that populates it is agents__list;
SessionUpdate::WorkerStatusChanged leaves it None because
nothing on that path reads it.
LoggedOut has no producer anywhere in the tree. AuthRequired
is derived, from the typed signals the CLI sends for an
authentication failure - an assistant message’s error, or a retry
frame naming that class - with the TurnError envelope’s text as
a fallback (busytools/forge#1201).
Two limits inherited from the signals this reads, not from the
derivation: Running does not tell a live turn apart from a
worker that died mid-turn, because subprocess death reaches no
terminal path and so never clears turn_pending
(busytools/forge#643). And a turn queued behind another reads
Idle until its first token, because turn_pending is a bool
that the first Result clears (busytools/forge#671). Treat this
as “what forge last observed”, never as proof of life.
Trait Implementations§
Source§impl Clone for WorkerStatus
impl Clone for WorkerStatus
Source§impl Debug for WorkerStatus
impl Debug for WorkerStatus
Source§impl<'de> Deserialize<'de> for WorkerStatus
impl<'de> Deserialize<'de> for WorkerStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WorkerStatus
Source§impl PartialEq for WorkerStatus
impl PartialEq for WorkerStatus
Source§impl Serialize for WorkerStatus
impl Serialize for WorkerStatus
impl StructuralPartialEq for WorkerStatus
Auto Trait Implementations§
impl Freeze for WorkerStatus
impl RefUnwindSafe for WorkerStatus
impl Send for WorkerStatus
impl Sync for WorkerStatus
impl Unpin for WorkerStatus
impl UnsafeUnpin for WorkerStatus
impl UnwindSafe for WorkerStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.