ClaimLost

org.llm4s.agent.graph.GraphError.ClaimLost
final case class ClaimLost(threadId: String, token: FencingToken, current: Option[FencingToken]) extends GraphError

The run lost its claim on the thread, so it stopped: its lease passed with no renewal landing (the run judges this itself, by its own monotonic clock), a renewal was refused (StaleClaim), or the store refused one of its commits as stale. The run commits nothing more - not even a RunFailed - and drops what it had not yet written; whatever it made durable before stands. token is the run's own claim, and current the thread's current claim when the store named one: another run then holds the thread. None means the store named none - the run judged its lease passed without asking it, or the store found no current claim (a successor that took over has since released it). A failure the run was recording when its commit was refused is logged, not carried. Unlike CheckpointWriteFailed, it is not a store outage. recover may be attempted once the thread is free: it is refused with ThreadBusy while a successor holds the thread, so retry; a successor that finished the work leaves the thread's state showing it (NothingToRecover); and a lease that lapsed with no successor leaves the last checkpoint Running, which recover continues.

Attributes

Source
GraphError.scala
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

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Additional context information

Additional context information

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Formatted error message with context

Formatted error message with context

Attributes

Inherited from:
LLMError
Source
LLMError.scala

The HTTP status of the response this error was mapped from; None when it is not a response's error.

The HTTP status of the response this error was mapped from; None when it is not a response's error.

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Whether sending the identical request again may succeed, with nobody in the loop: the library's one rule for retrying, which org.llm4s.reliability.RetryPolicy, org.llm4s.reliability.ReliableClient and the agent graph's node retries all apply.

Whether sending the identical request again may succeed, with nobody in the loop: the library's one rule for retrying, which org.llm4s.reliability.RetryPolicy, org.llm4s.reliability.ReliableClient and the agent graph's node retries all apply.

It is true for a RateLimitError, a TimeoutError, a NetworkError, an ExecutionError and a ServiceError whose status is 408, 429 or 5xx, and false for everything else: a request the provider refused as wrong (any other 4xx, a ValidationError, a ContextLengthError, a ModelNotFoundError), a rejected credential, a cancellation, and the two errors that need something to happen first - an OptimisticLockFailure (re-read the record) and a CircuitOpenError (wait for the circuit).

An error type of your own is not retried unless it overrides this member.

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

The provider's id for the failed request, from the response's headers or body, for a support ticket.

The provider's id for the failed request, from the response's headers or body, for a support ticket.

Attributes

Inherited from:
LLMError
Source
LLMError.scala

The delay the server asked for before the request is sent again (an HTTP Retry-After header), and only that: None when the server gave none. A delay the library chooses when the server is silent is the retry policy's, never reported here, so "the server said" and "we guessed" stay distinguishable.

The delay the server asked for before the request is sent again (an HTTP Retry-After header), and only that: None when the server gave none. A delay the library chooses when the server is silent is the retry policy's, never reported here, so "the server said" and "we guessed" stay distinguishable.

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Concrete fields

override val message: String

Human-readable error message

Human-readable error message

Attributes

Source
GraphError.scala