pub enum WorkerSpawnError {
NotLeadCaller,
EmptyLabel,
ReservedLabel,
LabelWithPathSeparator,
EmptyCharter,
UnknownCallerProject,
DispatchFailed {
message: String,
},
WorktreeCreationFailed {
reason: String,
},
ResumeLookupFailed {
label: String,
message: String,
},
}Expand description
Synchronous error from spawn_worker. All gating happens before
the workspace dispatch is even issued.
Variants§
NotLeadCaller
Caller is a worker, not a project lead. v1 is lead-only.
EmptyLabel
label is empty after trim.
ReservedLabel
label collides with the reserved "lead" keyword
(workers MCP uses it as an addressing target for the worker’s
own lead - see LEAD_LABEL).
LabelWithPathSeparator
label carries a slash. claude rewrites one before deriving its
worktree path and branch, so forge’s own composition from the raw
label names a directory and a branch claude never uses (#1603).
EmptyCharter
charter is empty after trim.
UnknownCallerProject
Caller’s session key resolves to no known project (defensive; the tools closure-bind a real key at spawn time, so this should never fire in practice).
DispatchFailed
Spawn was dispatched but the workspace returned an error (e.g. tag-write failed). Forwarded as-is to the LLM.
WorktreeCreationFailed
The worker’s git worktree is missing or unusable, so nothing was
spawned: claude could not create --worktree <label> (its reason
passed through verbatim), or the composed path belongs to another
project’s checkout or worker and was refused before anything
could touch it.
ResumeLookupFailed
resume_session was set and the label’s prior session could not
be looked up: the transcript directory, or a transcript in it, is
there and unreadable. Nothing was spawned. A lookup that found
nothing is not this - that one falls back to a fresh session and
reports it.
Implementations§
Trait Implementations§
Source§impl Clone for WorkerSpawnError
impl Clone for WorkerSpawnError
Source§impl Debug for WorkerSpawnError
impl Debug for WorkerSpawnError
impl Eq for WorkerSpawnError
Source§impl PartialEq for WorkerSpawnError
impl PartialEq for WorkerSpawnError
impl StructuralPartialEq for WorkerSpawnError
Auto Trait Implementations§
impl Freeze for WorkerSpawnError
impl RefUnwindSafe for WorkerSpawnError
impl Send for WorkerSpawnError
impl Sync for WorkerSpawnError
impl Unpin for WorkerSpawnError
impl UnsafeUnpin for WorkerSpawnError
impl UnwindSafe for WorkerSpawnError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§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.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more