Skip to content

ReplayToolMismatchException

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Replay could not find a recorded tool result.

public sealed class ReplayToolMismatchException : AgentPrismException, ISerializable

objectExceptionAgentPrismExceptionReplayToolMismatchException

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()

Silently skipping or running live is rejected: the first produces a gap the model cannot see and silently corrupts the result; the second produces a side effect the user did not ask for. The endpoint turns this exception into a 422 and writes which tool failed to match with which arguments.

Creates a new mismatch error.

public ReplayToolMismatchException()

Creates a new mismatch error.

public ReplayToolMismatchException(string message)

message string

The error message.

ReplayToolMismatchException(string, Exception)

Section titled “ ReplayToolMismatchException(string, Exception)”

Creates a new mismatch error.

public ReplayToolMismatchException(string message, Exception innerException)

message string

The error message.

innerException Exception

The underlying error.

The stable value written for AgentPrismException.ErrorType.

public const string ReplayToolMismatchErrorType = "replay_tool_mismatch"

string

The unmatched call’s arguments.

public string? Arguments { get; init; }

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.

The name of the unmatched tool.

public string? ToolName { get; init; }

string?

Produces an error with a standard message for an unmatched call.

public static ReplayToolMismatchException For(string toolName, string? arguments)

toolName string

The tool called by the model.

arguments string?

The call’s arguments.

ReplayToolMismatchException

The error.