ThreadBusy

org.llm4s.agent.graph.GraphError.ThreadBusy
final case class ThreadBusy(threadId: String, latestCheckpoint: Option[String], holder: BusyHolder) extends GraphError, RecoverableError

The thread is held, so the call was refused: another run is still executing on it in this runtime, another runtime or process holds a live claim on it (RunClaim), or it claimed the thread between this call reading it and claiming it; or the call's own claim lapsed before its write landed. start, recover, resume, deleteThread, updateState and fork (on its target thread) are refused this way, so it is recoverable: retry once that run has suspended or completed, or once its claim has expired. A refusal up front accepted, applied and discarded nothing. A BusyHolder.Lapsed refusal is the exception: a write the call had already sent may still land.

holder says who holds the thread as far as the caller may know (BusyHolder): a run's id when it is known and of the caller's tenant - a run of this runtime, or a claim recorded for the caller's tenant - and the thread's latest checkpoint, if any, is the caller's tenant's; BusyHolder.Unnamed when another run holds it but cannot be named, such as another tenant's; and BusyHolder.Lapsed when it is the call's own claim that lapsed, with no other run known to hold the thread. A caller of another tenant is refused with TenantMismatch instead, and learns nothing.

Attributes

Graph
Supertypes
trait GraphError
trait LLMError
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def code: Option[String]

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

Inherited from:
LLMError
def context: Map[String, String]

Additional context information

Additional context information

Attributes

Inherited from:
LLMError
def correlationId: Option[String]

Error correlation IDs for debugging

Error correlation IDs for debugging

Attributes

Inherited from:
LLMError
def formatted: String

Formatted error message with context

Formatted error message with context

Attributes

Inherited from:
LLMError
def maxRetries: Int

Maximum number of retry attempts recommended.

Maximum number of retry attempts recommended.

Attributes

Inherited from:
RecoverableError
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def retryDelay: Option[FiniteDuration]

Suggested delay before retrying.

Suggested delay before retrying.

Attributes

Inherited from:
RecoverableError

Concrete fields

override val message: String

Human-readable error message

Human-readable error message

Attributes