Skip to content

AgentPrismToolTimeoutException

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Thrown when a tool call does not settle within its configured timeout.

public sealed class AgentPrismToolTimeoutException : AgentPrismException, ISerializable

objectExceptionAgentPrismExceptionAgentPrismToolTimeoutException

ISerializable

AgentPrismException.ErrorType, Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Thrown by the wrapper installed in the tool registry, never by the tool body itself. Microsoft Agent Framework’s function-invoking client catches it and turns it into a tool result carrying the error — the run is not dropped, and the model sees a tool failure and can continue the turn.

CancellationToken is cooperative. A tool body that never reads its token is not forcibly stopped by this timeout — only the wait for it is cut short. The underlying work keeps running in the background until it finishes on its own; this is a documented limit, not a bug.

Creates a new error.

public AgentPrismToolTimeoutException()

Creates a new error.

public AgentPrismToolTimeoutException(string message)

message string

The error message.

AgentPrismToolTimeoutException(string, Exception)

Section titled “ AgentPrismToolTimeoutException(string, Exception)”

Creates a new error.

public AgentPrismToolTimeoutException(string message, Exception innerException)

message string

The error message.

innerException Exception

The underlying error.

The stable value written to AgentPrismException.ErrorType.

public const string ToolTimeoutErrorType = "tool_timeout"

string

Gets the stable error type name written to the run record.

public override string ErrorType { get; }

string

Defaults to the full name of the exception type, so today’s behaviour does not change. A derived type overrides this member when the record has to be machine readable — for example AgentPrismContentFilteredException writes content_filtered. Reports and alert rules can rely on this stable name instead of an assembly name.

The value is written to RunError.Type and carries no secret.

Gets the timeout that elapsed.

public TimeSpan? Timeout { get; init; }

TimeSpan?

Gets the name of the tool that timed out.

public string? ToolName { get; init; }

string?