E2ESessionOptions
Namespace: E2E
public sealed class E2ESessionOptionsHow to open one E2ESession. Retries set Attempt above 1 so the cache records but does not replay, except under CacheStrict, where every attempt replays.
Inheritance: object
Properties
Section titled “Properties”ActionTimeout
Section titled “ActionTimeout”public TimeSpan ActionTimeout { get; init; }Value: TimeSpan
public string? Agent { get; init; }The agent a call that names none uses, upstream’s agent option of a test or run. Unset, it is default. An unknown name is INVALID_ARGUMENT.
Value: string
AgentContext
Section titled “AgentContext”public string? AgentContext { get; init; }The default agent’s upstream context: told to every model call, at most 16384 UTF-8 bytes.
Value: string
AgentExecutor
Section titled “AgentExecutor”public IStepExecutor? AgentExecutor { get; init; }The default agent’s custom brain, upstream’s executor. See Executor.
Value: IStepExecutor
AgentSystem
Section titled “AgentSystem”public string? AgentSystem { get; init; }The default agent’s upstream system: text appended to the act rules. Judges never see it.
Value: string
AgentTools
Section titled “AgentTools”public IReadOnlyDictionary<string, AgentTool>? AgentTools { get; init; }The default agent’s project tools, offered to the model beside the agent’s own. See Tools.
Value: IReadOnlyDictionary<string, AgentTool>
Agents
Section titled “Agents”public IReadOnlyDictionary<string, AgentOptions>? Agents { get; init; }Named agents besides the default one, picked per call with the Agent option.
Each starts from the built-in defaults, not from the default agent.
Value: IReadOnlyDictionary<string, AgentOptions>
AiTrace
Section titled “AiTrace”public bool AiTrace { get; init; }E2E_AI_TRACE=1, the port’s counterpart of --ai-trace: every model call of the test is recorded in the AI SDK devtools
shape and added to ai-trace-<process id>.json next to the results directory (.e2e by default) when the session is released.
Value: bool
AssertionTimeout
Section titled “AssertionTimeout”public TimeSpan AssertionTimeout { get; init; }Value: TimeSpan
Attempt
Section titled “Attempt”public int Attempt { get; init; }1 is the first try. Later attempts do not replay, and still record verified acts.
Value: int
BaseUrl
Section titled “BaseUrl”public string? BaseUrl { get; init; }Value: string
public IStepCache? Cache { get; init; }Value: IStepCache
CacheEnabled
Section titled “CacheEnabled”public bool CacheEnabled { get; init; }Value: bool
CacheMode
Section titled “CacheMode”public CacheMode CacheMode { get; init; }ReadOnly replays but never writes or deletes recordings.
Value: CacheMode
CacheStrict
Section titled “CacheStrict”public bool CacheStrict { get; init; }When true, a recording that no longer matches fails the act with REPLAY_STALE. So does a
no-entry miss while a FileStepCache holds a recording of the same step under another key.
Retries replay too, and the session never writes or deletes a recording, whatever CacheMode says.
Value: bool
CleanupTimeout
Section titled “CleanupTimeout”public TimeSpan CleanupTimeout { get; init; }How long the engine may take to shut down on dispose. Upstream cleanupTimeout.
Value: TimeSpan
public bool Debug { get; init; }E2E_DEBUG=1, the port’s counterpart of --debug: the session times its phases and the agent’s observe, model,
and action phases, writes the table to stderr when it is released, and keeps each agent step’s transcript.
Value: bool
Engine
Section titled “Engine”public required IEngine Engine { get; init; }Value: IEngine
public IAgentModel? Judge { get; init; }The default agent’s judge for assert, waitFor, and extract. Defaults to Model.
Value: IAgentModel
JudgmentTimeout
Section titled “JudgmentTimeout”public TimeSpan JudgmentTimeout { get; init; }The default agent’s judgmentTimeout: the deadline of one assert, waitFor, or extract.
Value: TimeSpan
LaunchTimeout
Section titled “LaunchTimeout”public TimeSpan LaunchTimeout { get; init; }How long the engine may take to start. Upstream launchTimeout.
Value: TimeSpan
MaxModelCalls
Section titled “MaxModelCalls”public int MaxModelCalls { get; init; }The default agent’s model calls per agent call, 1 through 100.
Value: int
MaxSteps
Section titled “MaxSteps”public int MaxSteps { get; init; }Actions one ActAsync may take, 1 through 100. MaxSteps can only lower it.
Value: int
public IAgentModel? Model { get; init; }The default agent’s model.
Value: IAgentModel
OnSoftFailure
Section titled “OnSoftFailure”public Action<TestException>? OnSoftFailure { get; init; }Receives each expect.soft failure as it happens. Null keeps them
on the session until CloseSoftFailures().
Value: Action<TestException>
ProjectRoot
Section titled “ProjectRoot”public string? ProjectRoot { get; init; }Anchors the files a test names, such as a route’s fulfill Path. Defaults to the working directory.
Value: string
ProviderOptions
Section titled “ProviderOptions”public IReadOnlyDictionary<string, JsonElement>? ProviderOptions { get; init; }The default agent’s provider options, keyed by provider. See ProviderOptions.
Value: IReadOnlyDictionary<string, JsonElement>
ReplayTimeout
Section titled “ReplayTimeout”public TimeSpan ReplayTimeout { get; init; }How long a replay waits for each recorded target and for the recorded end state.
Value: TimeSpan
ResultsDirectory
Section titled “ResultsDirectory”public string? ResultsDirectory { get; init; }Where a failed screenshot comparison puts its diff, actual, and expected images. Defaults to .e2e/results under the project root.
Value: string
StepTimeout
Section titled “StepTimeout”public TimeSpan StepTimeout { get; init; }How long one ActAsync may run unless Timeout says otherwise. Judgments use JudgmentTimeout.
Value: TimeSpan
TargetName
Section titled “TargetName”public string? TargetName { get; init; }The target’s name in a stored screenshot’s file name. Defaults to the engine’s platform.
Value: string
TestAgentContext
Section titled “TestAgentContext”public string? TestAgentContext { get; init; }Upstream’s agentContext of a test or group: appended to the context of every agent, after its own.
Value: string
TestFailed
Section titled “TestFailed”public Func<bool>? TestFailed { get; init; }Reports whether the test has already failed. Once it returns true, a passing check no longer verifies acts, so a teardown assertion after a failure does not record them.
Value: Func<bool>
TestFile
Section titled “TestFile”public string? TestFile { get; init; }The full name of the test’s class, which stands for upstream’s test file: it joins the title in the result id and leads the
name of the result’s directory, so two tests with one title in two classes keep apart. The NUnit and xUnit adapters set it,
and e2e explore sets ExploreFile. It also makes the session a test, as upstream’s
environment.test does: every prompt then opens with Test: <TestTitle>. Null keeps the title
alone as the identity and adds no title line, as for an e2e mcp session, which runs no test.
Value: string
TestTimeout
Section titled “TestTimeout”public TimeSpan TestTimeout { get; init; }Value: TimeSpan
TestTitle
Section titled “TestTitle”public required string TestTitle { get; init; }Value: string
public ResolvedRecording Trace { get; init; }Which attempts record a trace. The session only carries the setting; Attempt says which attempt this is.
Value: ResolvedRecording
UpdateSnapshots
Section titled “UpdateSnapshots”public bool UpdateSnapshots { get; init; }E2E_UPDATE_SNAPSHOTS=1: ToHaveScreenshotAsync writes each stored screenshot it finds missing or
different, and passes.
Value: bool
public ResolvedRecording Video { get; init; }Which attempts record a video. The session only carries the setting; Attempt says which attempt this is.
Value: ResolvedRecording