FileDispatchRequest
Parameters and properties
Section titled “Parameters and properties”The fields below cover all variants; the signature specifies their allowed combinations.
hooksOptionalLifecycleHooks | undefinedDeclared workspaceReady, hostReady and sandboxReady preparation commands.limitsOptionalPick<StageLimits, "copyMs" | "collectMs"> | undefinedCopy and collection deadlines for file execution; Git preparation and integration limits are refused.observationOptionalObservationHub | undefinedExplicit observation hub preserving scoped delivery and synchronous usage accounting.loggingOptionalLogging | undefinedDeclared execution journal; replayable file effects are refused when reproduction is unsupported.activityTransportOptionalTransport | undefinedTransport for bounded resource activity observations; liveness does not authorize recovery.recoveryTransportOptionalTransport | undefinedExplicit Transport retaining sandbox recovery evidence independently of file snapshots.sandboxProviderRequiredSandboxProviderExecution provider with the required file binding capability; legacy providers remain usable for Git.agentRequiredCliAgent | CustomAgent | ReplayAgent | FallbackAgentExplicitly composed agent compatible with the selected file execution and conversation capabilities.signalOptionalAbortSignal | undefinedCancellation signal propagated to the operation and its process group; reusable sandboxes remain usable.variablesOptionalReadonly<Record<string, string>> | undefinedOnly explicitly declared environment variables reach the sandbox; no implicit .env loading.workspaceVariant-dependentFileWorkspace | undefinedOpen workspace borrowed for this operation; its caller remains responsible for closing it.workspaceSourceVariant-dependentundefined | FileWorkspaceSourceDeclared source for an owned resource; mutually exclusive with borrowing an open workspace.runIdOptionalstring | undefinedObservation ID for a standalone dispatch using createObservation(); generated when omitted. With a transport, creation refuses duplicate IDs. Nested dispatches join their workflow projection. A continuation is a new dispatch and does not inherit this ID.watchdogOptionalWatchdogOptions | undefinedOpt-in repetition detection for decoded tool calls and file changes. Disabled when omitted; a stop rejects with code stuck, a warning continues, and an instruction uses steering. Replay agents reject this option.pricesOptionalModelPriceTable | undefinedOptional model rates. With them, usage is attributed by model name, including harness requests, to match the table; without them only CLI turns are attributed, under agent-scoped keys. Use calculateUsageCost on the result to display its estimate; no dispatch-level monetary limit is enforced.redactOptionalreadonly RegExp[] | undefinedRegular expressions replacing matching persisted and observed strings with [REDACTED]. Added to inherited hub rules; prompts sent to the agent and returned results stay intact.labelOptionalstring | undefinedName shown for this dispatch in progress reports.briefRequiredBriefTask given to the agent: literal text or a file brief.passesOptionalnumber | undefinedMaximum passes, default 1. Each pass reruns the brief in a new conversation and the dispatch stops at the first pass whose text contains a completion marker. Must be 1 with response or continuation.untilOptionalstring | readonly string[] | undefinedCompletion marker or markers searched in the last turn’s text, default <outpost>done</outpost>. An empty list disables matching, so every pass runs; empty strings are rejected.idleMsOptionalnumber | undefinedLongest silence allowed from the agent, default 600000 (10 minutes). Past it the turn stops with code timeout.idleWarningMsOptionalnumber | undefinedSilence after which a warning event is emitted, then repeated at the same interval; default 60000.settleMsOptionalnumber | undefinedWait after a completion marker before stopping an agent that is still running, default 60000. The turn still succeeds.deadlineMsOptionalnumber | undefinedMaximum duration of each agent process, default 3600000 (one hour). Past it the turn fails with code timeout.expansionMsOptionalnumber | undefinedDeadline for each shell expansion in a file brief, default 30000. Past it the dispatch fails with code timeout.steeringOptionalSteering | undefinedController from createSteering(), attached for the whole dispatch and released when it ends. resume() and fork() do not reuse it.continuationOptional{ readonly id: string; readonly fork?: boolean; } | undefinedNative conversation to continue, by id; fork: true continues a copy and leaves the original unchanged. Requires one pass and an agent that supports resume.responseOptionalResponseSpec<T> | undefinedTyped response contract: appends final-answer format instructions and the JSON input schema after the rendered brief and steering messages included at turn start. Parses and validates the tagged answer, with up to repairs correction turns. Requires one pass; injection cannot be disabled.telemetryOptionalDispatchTelemetry | undefinedInstrumentation spanning the whole dispatch, including preparation, synchronization and cleanup. Its failures do not change the outcome.observeOptional((event: AgentObservation) => void) | undefinedReceives each normalized agent event with its pass number and timestamp. An exception thrown here is collected in observerErrors and does not change the outcome.warnOptional((message: string) => void) | undefinedReceives nonfatal warnings, such as an idle agent or a conversation storage problem.diagnosticOptional((message: string) => void) | undefinedReceives diagnostic messages, such as the estimated token size of each expanded brief command.outputsOptionalreadonly WorkspaceOutputOptions[] | undefinedDeclared protected publications performed only after successful work and sandbox closure.recoveryVariant-dependentFileWorkspaceRecoveryAuthorization | undefinedExplicit stopped-process recovery authorization; interrupted replay remains a separate workflow decision.storageQuotaVariant-dependentOmit<StorageReservationOptions, "signal"> | undefinedAdmission reservation through Transport; coordinates cooperating writers without enforcing a physical disk quota.inputsVariant-dependentreadonly WorkspaceInput[] | undefinedExplicit file inputs; JSON workflow parameters are never implicitly written to disk.runtimeVariant-dependentWorkspaceRuntimeOptions | undefinedControl directory and logical namespace, separate from the workspace files.pathsVariant-dependentreadonly string[] | undefinedExplicit relative path selection; copy selection does not implicitly apply .gitignore.retentionVariant-dependentWorkspaceRetention | undefinedrun cleans successful owned work, local retains it, portable additionally requires an explicit Transport and namespace.

