# Schemas: t3/orchestration-v2

> T3 Code · channel `nightly` · v0.1.15-nightly.20261205.5786 @ [`be521199aace`](https://github.com/pingdotgg/t3code/tree/be521199aace1a0b446f4db4a1181ef994aaa1e2) · 2026-12-05 · generated by Everdoc from source (no LLM).

172 entries.

<a id="schema-acpreplaytranscript"></a>

## `AcpReplayTranscript`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.testkit.ts:31](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.testkit.ts#L31-L38)
- Shape: `{ provider: TrimmedNonEmptyString; protocol: "acp.ndjson-jsonrpc"; version: string; scenario: string; metadata?: Record<string, unknown>; entries: ProviderReplayEntry[] }`

<a id="schema-acpreplaytranscriptdecodeerror"></a>

## `AcpReplayTranscriptDecodeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.testkit.ts:44](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.testkit.ts#L44-L57)
- Shape: `{ _tag: "AcpReplayTranscriptDecodeError"; expectedProvider: TrimmedNonEmptyString; driver?: string; protocol?: string; scenario?: string; cause: unknown }`

<a id="schema-attachmentclaimerror"></a>

## `AttachmentClaimError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/AttachmentClaims.ts:20](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/AttachmentClaims.ts#L20-L26)
- Shape: `{ _tag: "AttachmentClaimError"; message: string; cause?: unknown }`

<a id="schema-claude_provider"></a>

## `CLAUDE_PROVIDER`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:273](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L273)
- Shape: `string`

<a id="schema-checkpointbaselinecaptureerror"></a>

## `CheckpointBaselineCaptureError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointService.ts:58](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointService.ts#L58-L69)
- Shape: `{ _tag: "CheckpointBaselineCaptureError"; scopeId: makeEntityId; ordinalWithinScope: number; cause: unknown }`

<a id="schema-checkpointcaptureerror"></a>

## `CheckpointCaptureError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointService.ts:71](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointService.ts#L71-L82)
- Shape: `{ _tag: "CheckpointCaptureError"; scopeId: makeEntityId; parentCheckpointId?: makeEntityId; cause: unknown }`

<a id="schema-checkpointcaptureexecutionerror"></a>

## `CheckpointCaptureExecutionError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointCaptureService.ts:30](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointCaptureService.ts#L30-L38)
- Shape: `{ _tag: "CheckpointCaptureExecutionError"; threadId: makeEntityId; runId: makeEntityId; scopeId: makeEntityId; cause?: unknown }`

<a id="schema-checkpointdeletestalerefserror"></a>

## `CheckpointDeleteStaleRefsError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointService.ts:97](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointService.ts#L97-L108)
- Shape: `{ _tag: "CheckpointDeleteStaleRefsError"; scopeId: makeEntityId; checkpointIds: makeEntityId[]; cause: unknown }`

<a id="schema-checkpointrestoreerror"></a>

## `CheckpointRestoreError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointService.ts:84](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointService.ts#L84-L95)
- Shape: `{ _tag: "CheckpointRestoreError"; scopeId: makeEntityId; checkpointId: makeEntityId; cause: unknown }`

<a id="schema-checkpointrollbackexecutionerror"></a>

## `CheckpointRollbackExecutionError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointRollbackService.ts:48](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointRollbackService.ts#L48-L78)
- Shape: `{ _tag: "CheckpointRollbackExecutionError"; reason: "rollback-target-invalid" | "active-provider-changed" | "provider-turn-unavailable" | "unexpected-failure" | "shared-workspace"; threadId: makeEntityId; providerThreadId: makeEntityId; checkpointId: makeEntityId; cause?: unknown }`

<a id="schema-checkpointrootscopeprepareerror"></a>

## `CheckpointRootScopePrepareError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointService.ts:45](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointService.ts#L45-L56)
- Shape: `{ _tag: "CheckpointRootScopePrepareError"; threadId: makeEntityId; runId: makeEntityId; cause: unknown }`

<a id="schema-checkpointservicev2error"></a>

## `CheckpointServiceV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CheckpointService.ts:110](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CheckpointService.ts#L110-L116)
- Shape: `CheckpointRootScopePrepareError | CheckpointBaselineCaptureError | CheckpointCaptureError | CheckpointRestoreError | CheckpointDeleteStaleRefsError`

<a id="schema-claudeagentsdkprotocollogevent"></a>

## `ClaudeAgentSdkProtocolLogEvent`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:1305](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L1305)
- Shape: `{ direction: "outgoing"; stage: "decoded"; payload: { type: "query.open"; options: ClaudeAgentSdkLoggedQueryOptions } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "prompt.offer"; message: SDKUserMessage } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.set_model"; model: string } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.apply_flag_settings"; settings: ClaudeFlagSettings } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.set_permission_mode"; mode: PermissionMode } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.rename_session"; title: string } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.stop_task"; taskId: string } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.background_tasks"; toolUseId: string } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.interrupt" } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "query.close" } } | { direction: "outgoing"; stage: "decoded"; payload: { type: "session.fork"; sessionId: string; options: ForkSessionOptions } } | { direction: "incoming"; …`

<a id="schema-claudeagentsdkqueryrunnererror"></a>

## `ClaudeAgentSdkQueryRunnerError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:911](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L911-L921)
- Shape: `{ _tag: "ClaudeAgentSdkQueryRunnerError"; method: string; cause: unknown }`

<a id="schema-claudeagentsdkreplayerror"></a>

## `ClaudeAgentSdkReplayError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:161](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L161-L169)
- Shape: `ClaudeReplayTranscriptDecodeError | ClaudeReplayExhaustedError | ClaudeReplayUnexpectedOutboundError | ClaudeReplayFrameMismatchError | ClaudeReplayRuntimeExitError | ClaudeReplayIncompleteError | ClaudeReplayDriverError`

<a id="schema-claudeappendsystempromptfileerror"></a>

## `ClaudeAppendSystemPromptFileError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:978](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L978-L988)
- Shape: `{ _tag: "ClaudeAppendSystemPromptFileError"; path: string; cause?: unknown }`

<a id="schema-claudeappendsystempromptmissingvalueerror"></a>

## `ClaudeAppendSystemPromptMissingValueError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:990](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L990-L997)
- Shape: `{ _tag: "ClaudeAppendSystemPromptMissingValueError"; flag: "--append-system-prompt" | "--append-system-prompt-file" }`

<a id="schema-claudebackgroundworkblocksqueryreplacementerror"></a>

## `ClaudeBackgroundWorkBlocksQueryReplacementError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:969](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L969-L976)
- Shape: `{ _tag: "ClaudeBackgroundWorkBlocksQueryReplacementError" }`

<a id="schema-claudecoderootrefusalerror"></a>

## `ClaudeCodeRootRefusalError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:923](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L923-L932)
- Shape: `{ _tag: "ClaudeCodeRootRefusalError"; cause: unknown }`

<a id="schema-claudecodestartupexiterror"></a>

## `ClaudeCodeStartupExitError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:945](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L945-L956)
- Shape: `{ _tag: "ClaudeCodeStartupExitError"; status: string; guidance: string; cause: unknown }`

<a id="schema-claudeconversationnotfounderror"></a>

## `ClaudeConversationNotFoundError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:934](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L934-L943)
- Shape: `{ _tag: "ClaudeConversationNotFoundError"; cause: unknown }`

<a id="schema-claudeorchestratorreplayharnesserror"></a>

## `ClaudeOrchestratorReplayHarnessError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:171](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L171-L174)
- Shape: `ClaudeAgentSdkReplayError | ProviderAdapterDriverCreateError`

<a id="schema-claudereplaydrivererror"></a>

## `ClaudeReplayDriverError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:149](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L149-L159)
- Shape: `{ _tag: "ClaudeReplayDriverError"; scenario: string; cause: unknown }`

<a id="schema-claudereplayexhaustederror"></a>

## `ClaudeReplayExhaustedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:80](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L80-L91)
- Shape: `{ _tag: "ClaudeReplayExhaustedError"; scenario: string; cursor: number; actual: unknown }`

<a id="schema-claudereplayframemismatcherror"></a>

## `ClaudeReplayFrameMismatchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:107](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L107-L120)
- Shape: `{ _tag: "ClaudeReplayFrameMismatchError"; scenario: string; cursor: number; label?: string; expected: unknown; actual: unknown }`

<a id="schema-claudereplayincompleteerror"></a>

## `ClaudeReplayIncompleteError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:136](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L136-L147)
- Shape: `{ _tag: "ClaudeReplayIncompleteError"; scenario: string; cursor: number; remaining: number }`

<a id="schema-claudereplayruntimeexiterror"></a>

## `ClaudeReplayRuntimeExitError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:122](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L122-L134)
- Shape: `{ _tag: "ClaudeReplayRuntimeExitError"; scenario: string; cursor: number; status: "error" | "cancelled"; error?: unknown }`

<a id="schema-claudereplaytranscriptdecodeerror"></a>

## `ClaudeReplayTranscriptDecodeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:66](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L66-L78)
- Shape: `{ _tag: "ClaudeReplayTranscriptDecodeError"; driver?: string; protocol?: string; scenario?: string; cause: unknown }`

<a id="schema-claudereplayunexpectedoutbounderror"></a>

## `ClaudeReplayUnexpectedOutboundError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts:93](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts#L93-L105)
- Shape: `{ _tag: "ClaudeReplayUnexpectedOutboundError"; scenario: string; cursor: number; expectedType: string; actual: unknown }`

<a id="schema-claudesettingslaunchargerror"></a>

## `ClaudeSettingsLaunchArgError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:999](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts#L999-L1009)
- Shape: `{ _tag: "ClaudeSettingsLaunchArgError"; path?: string; cause?: unknown }`

<a id="schema-codexorchestratorreplayharnesserror"></a>

## `CodexOrchestratorReplayHarnessError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.testkit.ts:41](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.testkit.ts#L41-L45)
- Shape: `CodexReplayTranscriptDecodeError | CodexAppServerReplayError | ProviderAdapterDriverCreateError`

<a id="schema-codexreplaytranscriptdecodeerror"></a>

## `CodexReplayTranscriptDecodeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.testkit.ts:27](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.testkit.ts#L27-L39)
- Shape: `{ _tag: "CodexReplayTranscriptDecodeError"; driver?: string; protocol?: string; scenario?: string; cause: unknown }`

<a id="schema-commandpolicycapability"></a>

## `CommandPolicyCapability`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandPolicy.ts:26](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandPolicy.ts#L26-L37)
- Shape: `"queued_messages" | "active_steering" | "interrupt" | "interrupt_restart_steering" | "native_fork" | "fork_from_turn" | "rollback" | "rollback_snapshot" | "context_handoff" | "strong_terminal_status"`

<a id="schema-commandpolicycapabilityunsupportederror"></a>

## `CommandPolicyCapabilityUnsupportedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandPolicy.ts:40](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandPolicy.ts#L40-L53)
- Shape: `{ _tag: "CommandPolicyCapabilityUnsupportedError"; commandId: makeEntityId; threadId: makeEntityId; providerInstanceId: TrimmedNonEmptyString; capability: CommandPolicyCapability; detail: string }`

<a id="schema-commandpolicyv2error"></a>

## `CommandPolicyV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandPolicy.ts:55](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandPolicy.ts#L55)
- Shape: `CommandPolicyCapabilityUnsupportedError`

<a id="schema-commandreceiptstorereaderror"></a>

## `CommandReceiptStoreReadError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandReceiptStore.ts:22](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandReceiptStore.ts#L22-L32)
- Shape: `{ _tag: "CommandReceiptStoreReadError"; commandId: makeEntityId; cause?: unknown }`

<a id="schema-commandreceiptstorev2error"></a>

## `CommandReceiptStoreV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandReceiptStore.ts:34](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandReceiptStore.ts#L34-L37)
- Shape: `CommandReceiptStoreWriteError | CommandReceiptStoreReadError`

<a id="schema-commandreceiptstorewriteerror"></a>

## `CommandReceiptStoreWriteError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandReceiptStore.ts:10](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandReceiptStore.ts#L10-L20)
- Shape: `{ _tag: "CommandReceiptStoreWriteError"; commandId: makeEntityId; cause?: unknown }`

<a id="schema-commandreceiptv2"></a>

## `CommandReceiptV2`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandReceiptStore.ts:43](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandReceiptStore.ts#L43-L51)
- Shape: `{ commandId: makeEntityId; threadId: makeEntityId; commandType: string; acceptedAt: date; resultSequence: NonNegativeInt; status: CommandReceiptV2Status; error: string | null }`

<a id="schema-commandreceiptv2status"></a>

## `CommandReceiptV2Status`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandReceiptStore.ts:40](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandReceiptStore.ts#L40)
- Shape: `"accepted" | "rejected"`

<a id="schema-commitbatcherror"></a>

## `CommitBatchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderCommitBatch.ts:71](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderCommitBatch.ts#L71-L73)
- Shape: `{ _tag: "CommitBatchError"; cause: unknown }`

<a id="schema-contexthandoffdeliveryuncertainerror"></a>

## `ContextHandoffDeliveryUncertainError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ContextHandoffDelivery.ts:165](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ContextHandoffDelivery.ts#L165-L172)
- Shape: `{ _tag: "ContextHandoffDeliveryUncertainError" }`

<a id="schema-contexthandoffprepareerror"></a>

## `ContextHandoffPrepareError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ContextHandoffService.ts:33](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ContextHandoffService.ts#L33-L46)
- Shape: `{ _tag: "ContextHandoffPrepareError"; threadId: makeEntityId; targetRunId: makeEntityId; fromProviderThreadIds: makeEntityId[]; toProviderThreadId: makeEntityId; cause?: unknown }`

<a id="schema-contexthandoffservicev2error"></a>

## `ContextHandoffServiceV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ContextHandoffService.ts:48](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ContextHandoffService.ts#L48)
- Shape: `ContextHandoffPrepareError`

<a id="schema-cursoragentsdkreplayerror"></a>

## `CursorAgentSdkReplayError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts:113](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts#L113-L119)
- Shape: `CursorReplayTranscriptDecodeError | CursorReplayExhaustedError | CursorReplayFrameMismatchError | CursorReplayIncompleteError | CursorReplayRuntimeError`

<a id="schema-cursororchestratorreplayharnesserror"></a>

## `CursorOrchestratorReplayHarnessError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts:124](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts#L124-L127)
- Shape: `CursorAgentSdkReplayError | ProviderAdapterDriverCreateError`

<a id="schema-cursorreplayexhaustederror"></a>

## `CursorReplayExhaustedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts:60](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts#L60-L71)
- Shape: `{ _tag: "CursorReplayExhaustedError"; scenario: string; cursor: number; actual: unknown }`

<a id="schema-cursorreplayframemismatcherror"></a>

## `CursorReplayFrameMismatchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts:73](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts#L73-L85)
- Shape: `{ _tag: "CursorReplayFrameMismatchError"; scenario: string; cursor: number; expected: unknown; actual: unknown }`

<a id="schema-cursorreplayincompleteerror"></a>

## `CursorReplayIncompleteError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts:87](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts#L87-L98)
- Shape: `{ _tag: "CursorReplayIncompleteError"; scenario: string; cursor: number; remaining: number }`

<a id="schema-cursorreplayruntimeerror"></a>

## `CursorReplayRuntimeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts:100](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts#L100-L111)
- Shape: `{ _tag: "CursorReplayRuntimeError"; scenario: string; cursor: number; cause: unknown }`

<a id="schema-cursorreplaytranscriptdecodeerror"></a>

## `CursorReplayTranscriptDecodeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts:46](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts#L46-L58)
- Shape: `{ _tag: "CursorReplayTranscriptDecodeError"; driver?: string; protocol?: string; scenario?: string; cause: unknown }`

<a id="schema-effectoutboxerror"></a>

## `EffectOutboxError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EffectOutbox.ts:210](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EffectOutbox.ts#L210-L221)
- Shape: `{ _tag: "EffectOutboxError"; operation: string; effectId?: string; cause?: unknown }`

<a id="schema-eventsinkstreamerror"></a>

## `EventSinkStreamError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EventSink.ts:56](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EventSink.ts#L56-L69)
- Shape: `{ _tag: "EventSinkStreamError"; threadId?: makeEntityId; afterSequence?: number; cause?: unknown }`

<a id="schema-eventsinkv2error"></a>

## `EventSinkV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EventSink.ts:71](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EventSink.ts#L71)
- Shape: `EventSinkWriteError | EventSinkStreamError`

<a id="schema-eventsinkwriteerror"></a>

## `EventSinkWriteError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EventSink.ts:43](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EventSink.ts#L43-L54)
- Shape: `{ _tag: "EventSinkWriteError"; eventCount: number; commandId?: makeEntityId; cause?: unknown }`

<a id="schema-eventstoreappendeventserror"></a>

## `EventStoreAppendEventsError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EventStore.ts:17](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EventStore.ts#L17-L27)
- Shape: `{ _tag: "EventStoreAppendEventsError"; eventCount: number; cause?: unknown }`

<a id="schema-eventstorereadeventserror"></a>

## `EventStoreReadEventsError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EventStore.ts:29](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EventStore.ts#L29-L42)
- Shape: `{ _tag: "EventStoreReadEventsError"; afterSequence?: number; threadId?: makeEntityId; cause?: unknown }`

<a id="schema-eventstorev2error"></a>

## `EventStoreV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EventStore.ts:44](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EventStore.ts#L44-L47)
- Shape: `EventStoreAppendEventsError | EventStoreReadEventsError`

<a id="schema-forkexecutionpolicyv2"></a>

## `ForkExecutionPolicyV2`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandPolicy.ts:23](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandPolicy.ts#L23)
- Shape: `"native_fork" | "portable_context"`

<a id="schema-invalidthreadhistorycursorerror"></a>

## `InvalidThreadHistoryCursorError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/threadHistoryPaging.ts:129](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/threadHistoryPaging.ts#L129-L136)
- Shape: `{ _tag: "InvalidThreadHistoryCursorError" }`

<a id="schema-legacyv1threadimporterror"></a>

## `LegacyV1ThreadImportError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.ts:95](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.ts#L95-L108)
- Shape: `{ _tag: "LegacyV1ThreadImportError"; operation: string; threadId?: makeEntityId; cause?: unknown }`

<a id="schema-livestreambuffererror"></a>

## `LiveStreamBufferError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/LiveStreamBudget.ts:13](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/LiveStreamBudget.ts#L13-L16)
- Shape: `{ _tag: "LiveStreamBufferError"; message: string }`

<a id="schema-opencodeorchestratorreplayharnesserror"></a>

## `OpenCodeOrchestratorReplayHarnessError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts:83](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts#L83-L86)
- Shape: `OpenCodeReplayError | ProviderAdapterDriverCreateError`

<a id="schema-opencodereplayerror"></a>

## `OpenCodeReplayError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts:77](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts#L77-L81)
- Shape: `OpenCodeReplayTranscriptDecodeError | OpenCodeReplayMismatchError | OpenCodeReplayIncompleteError`

<a id="schema-opencodereplayincompleteerror"></a>

## `OpenCodeReplayIncompleteError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts:64](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts#L64-L75)
- Shape: `{ _tag: "OpenCodeReplayIncompleteError"; scenario: string; cursor: number; remaining: number }`

<a id="schema-opencodereplaymismatcherror"></a>

## `OpenCodeReplayMismatchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts:50](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts#L50-L62)
- Shape: `{ _tag: "OpenCodeReplayMismatchError"; scenario: string; cursor: number; expected: unknown; actual: unknown }`

<a id="schema-opencodereplaytranscriptdecodeerror"></a>

## `OpenCodeReplayTranscriptDecodeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts:36](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Adapters/OpenCodeAdapterV2.testkit.ts#L36-L48)
- Shape: `{ _tag: "OpenCodeReplayTranscriptDecodeError"; driver?: string; protocol?: string; scenario?: string; cause: unknown }`

<a id="schema-orchestrationeffectexecutionerror"></a>

## `OrchestrationEffectExecutionError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EffectWorker.ts:39](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EffectWorker.ts#L39-L46)
- Shape: `{ _tag: "OrchestrationEffectExecutionError"; effectId: string; effectType: string; cause?: unknown }`

<a id="schema-orchestrationeffectrequestv2"></a>

## `OrchestrationEffectRequestV2`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EffectOutbox.ts:36](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EffectOutbox.ts#L36-L147)
- Shape: `{ type: "provider-runtime.continue"; sourceRunId: makeEntityId; processLossCount?: number; cause?: "provider_exit" } | { type: "provider-session.detach"; providerSessionId: makeEntityId; detail?: string; revokeMcpCredential?: boolean; handoffProviderThread?: Schema.toCodecJson; handoffRunId?: makeEntityId } | { type: "provider-session.apply-model-selection"; providerSessionId: makeEntityId; providerThreadId: makeEntityId; modelSelection: { provider?: unknown; instanceId?: unknown; model: unknown; options?: … | null } } | { type: "provider-session.apply-thread-title"; title: string } | { type: "provider-turn.start"; runId: makeEntityId } | { type: "provider-turn.interrupt"; providerSessionId: makeEntityId; providerThreadId: makeEntityId; providerTurnId: makeEntityId; subagent?: { id: makeEntityId; nativeTaskId: string } } | { type: "provider-turn.steer"; providerSessionId: makeEntityId; providerThreadId: makeEntityId; providerTurnId: makeEntityId; messageId: makeEntityId; modelSelection?: { provider?: …; instanceId?: …; model: unknown; options?: … }; steerFollowUpAfterRunOrdinal?: NonNegativeInt } | { type: "provider-turn.restart"; providerSessionId: makeEntityId; providerThreadId:…`

<a id="schema-orchestrationeffectstatusv2"></a>

## `OrchestrationEffectStatusV2`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EffectOutbox.ts:174](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EffectOutbox.ts#L174-L180)
- Shape: `"pending" | "running" | "succeeded" | "failed" | "cancelled"`

<a id="schema-orchestrationeffectworkererror"></a>

## `OrchestrationEffectWorkerError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/EffectWorker.ts:794](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/EffectWorker.ts#L794-L801)
- Shape: `{ _tag: "OrchestrationEffectWorkerError"; operation: string; effectId?: string; cause?: unknown }`

<a id="schema-orchestratorcommandidconflicterror"></a>

## `OrchestratorCommandIdConflictError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:404](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L404-L416)
- Shape: `{ _tag: "OrchestratorCommandIdConflictError"; commandId: makeEntityId; commandType: string; receiptThreadId: makeEntityId; commandThreadId: makeEntityId }`

<a id="schema-orchestratorcommandpreviouslyrejectederror"></a>

## `OrchestratorCommandPreviouslyRejectedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:391](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L391-L402)
- Shape: `{ _tag: "OrchestratorCommandPreviouslyRejectedError"; commandId: makeEntityId; commandType: string; detail: string }`

<a id="schema-orchestratorcommandrejectederror"></a>

## `OrchestratorCommandRejectedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:268](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L268-L275)
- Shape: `{ _tag: "OrchestratorCommandRejectedError"; commandId: makeEntityId; commandType: string; cause?: unknown }`

<a id="schema-orchestratordispatcherror"></a>

## `OrchestratorDispatchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:246](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L246-L257)
- Shape: `{ _tag: "OrchestratorDispatchError"; commandId: makeEntityId; commandType: string; cause?: unknown }`

<a id="schema-orchestratordomaineventstreamerror"></a>

## `OrchestratorDomainEventStreamError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:291](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L291-L300)
- Shape: `{ _tag: "OrchestratorDomainEventStreamError"; cause?: unknown }`

<a id="schema-orchestratorfixtureinputstep"></a>

## `OrchestratorFixtureInputStep`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/testkit/fixtures/shared.ts:176](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/testkit/fixtures/shared.ts#L176)
- Shape: `{ type: "message"; text: string; attachments?: ChatAttachment[] } | { type: "fork"; fromRunIndex: number; text: string } | { type: "queue_message"; text: string; attachments?: ChatAttachment[]; createdBy?: Extract< OrchestrationV2Command, { read…; creationSource?: Extract< OrchestrationV2Command, { read… } | { type: "cancel_queued_run"; targetRunIndex: number } | { type: "await_run_status"; targetRunIndex: number; status: OrchestrationV2RunStatus; waitForTurnItemType?: OrchestrationV2TurnItem["type"] } | { type: "finish_held_run"; targetRunIndex: number; status: OrchestrationV2RunStatus } | { type: "capture_shell_snapshot"; key: string } | { type: "release_replay_gate"; label: string } | { type: "steer"; text: string; attachments?: ChatAttachment[]; targetRunIndex: number } | { type: "restart"; text: string; attachments?: ChatAttachment[]; targetRunIndex: number } | { type: "interrupt"; targetRunIndex: number; waitForTurnItemType?: OrchestrationV2TurnItem["type"]; waitForTurnItemStatus?: OrchestrationV2TurnItem["status"]; inSubagentThread?: boolean } | { type: "stop_background_work"; targetRunIndex: number } | { type: "release_replay_gate_after_waiting"; label: string; targetRunIn…`

<a id="schema-orchestratorprojectionerror"></a>

## `OrchestratorProjectionError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:277](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L277-L287)
- Shape: `{ _tag: "OrchestratorProjectionError"; threadId: makeEntityId; cause?: unknown }`

<a id="schema-orchestratorprovideradaptererror"></a>

## `OrchestratorProviderAdapterError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:302](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L302-L313)
- Shape: `{ _tag: "OrchestratorProviderAdapterError"; commandId: makeEntityId; providerInstanceId: TrimmedNonEmptyString; cause?: unknown }`

<a id="schema-orchestratorproviderselectionbusyerror"></a>

## `OrchestratorProviderSelectionBusyError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:356](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L356-L363)
- Shape: `{ _tag: "OrchestratorProviderSelectionBusyError"; commandId: makeEntityId; threadId: makeEntityId }`

<a id="schema-orchestratorruntimemodeaboveceilingerror"></a>

## `OrchestratorRuntimeModeAboveCeilingError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:374](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L374-L389)
- Shape: `{ _tag: "OrchestratorRuntimeModeAboveCeilingError"; commandId: makeEntityId; threadId: makeEntityId; refused: "mode" | "turn"; runtimeMode: RuntimeMode; maxRuntimeMode: RuntimeMode; organization: string }`

<a id="schema-orchestratorsubagentthreadreadonlyerror"></a>

## `OrchestratorSubagentThreadReadOnlyError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:315](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L315-L322)
- Shape: `{ _tag: "OrchestratorSubagentThreadReadOnlyError"; commandId: makeEntityId; threadId: makeEntityId }`

<a id="schema-orchestratorthreadabovemodelimiterror"></a>

## `OrchestratorThreadAboveModeLimitError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:341](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L341-L354)
- Shape: `{ _tag: "OrchestratorThreadAboveModeLimitError"; commandId: makeEntityId; threadId: makeEntityId; mode: "runtime" | "interaction"; runtimeMode: RuntimeMode; interactionMode: ProviderInteractionMode }`

<a id="schema-orchestratorthreadalreadyexistserror"></a>

## `OrchestratorThreadAlreadyExistsError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:259](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L259-L266)
- Shape: `{ _tag: "OrchestratorThreadAlreadyExistsError"; commandId: makeEntityId; threadId: makeEntityId }`

<a id="schema-orchestratorthreadmovederror"></a>

## `OrchestratorThreadMovedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:325](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L325-L339)
- Shape: `{ _tag: "OrchestratorThreadMovedError"; commandId: makeEntityId; threadId: makeEntityId; label: string; state: "departing" | "departed" }`

<a id="schema-orchestratorv2error"></a>

## `OrchestratorV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/Orchestrator.ts:418](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/Orchestrator.ts#L418-L432)
- Shape: `OrchestratorDispatchError | OrchestratorThreadAlreadyExistsError | OrchestratorCommandRejectedError | OrchestratorProjectionError | OrchestratorDomainEventStreamError | OrchestratorProviderAdapterError | OrchestratorCommandPreviouslyRejectedError | OrchestratorCommandIdConflictError | OrchestratorSubagentThreadReadOnlyError | OrchestratorThreadMovedError | OrchestratorThreadAboveModeLimitError | OrchestratorProviderSelectionBusyError | OrchestratorRuntimeModeAboveCeilingError`

<a id="schema-orchestratorv2scenariostep"></a>

## `OrchestratorV2ScenarioStep`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/testkit/OrchestratorScenario.ts:31](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/testkit/OrchestratorScenario.ts#L31)
- Shape: `{ type: "dispatch"; command: OrchestrationV2Command; await?: boolean; key?: string } | { type: "advance_clock"; duration: Duration.Input; awaitProviderSessionRelease?: ThreadId } | { type: "await"; key: string } | { type: "await_all" } | { type: "await_thread_idle"; threadId: ThreadId } | { type: "await_no_background_work"; threadId: ThreadId } | { type: "await_run_steerable"; threadId: ThreadId; runId: OrchestrationV2Run["id"] } | { type: "await_run_status"; threadId: ThreadId; runId: OrchestrationV2Run["id"]; status: OrchestrationV2Run["status"] } | { type: "finish_held_run"; threadId: ThreadId; runId: OrchestrationV2Run["id"]; status: OrchestrationV2Run["status"] } | { type: "await_run_turn_item"; threadId: ThreadId; runId: OrchestrationV2Run["id"]; itemType: OrchestrationV2TurnItem["type"]; itemStatus?: OrchestrationV2TurnItem["status"]; inSubagentThreads?: boolean } | { type: "release_replay_gate_after_waiting"; label: string; threadId: ThreadId; runId: OrchestrationV2Run["id"] } | { type: "release_replay_gate"; label: string } | { type: "capture_shell_snapshot"; key: string } | { type: "respond_to_next_runtime_request"; threadId: ThreadId; commandId: CommandId; decision?: Pr…`

<a id="schema-orchestratorv2scenariosteperror"></a>

## `OrchestratorV2ScenarioStepError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/testkit/OrchestratorScenario.ts:126](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/testkit/OrchestratorScenario.ts#L126-L136)
- Shape: `{ _tag: "OrchestratorV2ScenarioStepError"; scenario: string; step: string }`

<a id="schema-projectcommandinvarianterror"></a>

## `ProjectCommandInvariantError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectCommands.ts:57](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectCommands.ts#L57-L67)
- Shape: `{ _tag: "ProjectCommandInvariantError"; commandType: string; detail: string }`

<a id="schema-projectcommandmissingprojecterror"></a>

## `ProjectCommandMissingProjectError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectCommands.ts:69](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectCommands.ts#L69-L79)
- Shape: `{ _tag: "ProjectCommandMissingProjectError"; commandType: string; projectId: makeEntityId }`

<a id="schema-projectcommandreceiptv2"></a>

## `ProjectCommandReceiptV2`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandReceiptStore.ts:54](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandReceiptStore.ts#L54-L62)
- Shape: `{ commandId: makeEntityId; projectId: makeEntityId; commandType: string; acceptedAt: date; resultSequence: NonNegativeInt; status: CommandReceiptV2Status; error: string | null }`

<a id="schema-projectcommandrejection"></a>

## `ProjectCommandRejection`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectCommands.ts:93](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectCommands.ts#L93-L97)
- Shape: `ProjectCommandInvariantError | ProjectCommandMissingProjectError | ProjectWorkspaceConflictError`

<a id="schema-projectrow"></a>

## `ProjectRow`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectStore.ts:34](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectStore.ts#L34-L51)
- Shape: `{ projectId: makeEntityId; title: string; hasCustomTitle: boolean; workspaceRoot: string; defaultModelSelection: { provider?: unknown; instanceId?: unknown; model: unknown; options?: … | null } | null; defaultThreadEnvMode: ThreadEnvMode | null; autoPull: boolean; faviconPath: string | null; projectIcon: StoredProjectIcon | null; scripts: ProjectScript[]; trackedFolders: ProjectTrackedFolders; pinnedAt: string | null; archivedAt: string | null; createdAt: string; updatedAt: string; deletedAt: string | null }`

<a id="schema-projectstorev2error"></a>

## `ProjectStoreV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectStore.ts:22](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectStore.ts#L22-L32)
- Shape: `{ _tag: "ProjectStoreV2Error"; operation: string; cause: unknown }`

<a id="schema-projectworkspaceconflicterror"></a>

## `ProjectWorkspaceConflictError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectCommands.ts:81](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectCommands.ts#L81-L91)
- Shape: `{ _tag: "ProjectWorkspaceConflictError"; workspaceRoot: string; conflictingProjectId: makeEntityId }`

<a id="schema-projectionmaintenanceerror"></a>

## `ProjectionMaintenanceError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionMaintenance.ts:18](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionMaintenance.ts#L18-L24)
- Shape: `{ _tag: "ProjectionMaintenanceError"; operation: string; cause?: unknown }`

<a id="schema-projectionreplayerror"></a>

## `ProjectionReplayError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/testkit/ProjectionReplay.ts:23](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/testkit/ProjectionReplay.ts#L23-L26)
- Shape: `{ _tag: "ProjectionReplayError"; cause: unknown }`

<a id="schema-projectionstoreapplyeventerror"></a>

## `ProjectionStoreApplyEventError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:147](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L147-L157)
- Shape: `{ _tag: "ProjectionStoreApplyEventError"; eventType: string; cause?: unknown }`

<a id="schema-projectionstorereaderror"></a>

## `ProjectionStoreReadError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:181](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L181-L191)
- Shape: `{ _tag: "ProjectionStoreReadError"; threadId: makeEntityId; cause?: unknown }`

<a id="schema-projectionstoresetuperror"></a>

## `ProjectionStoreSetupError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:159](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L159-L168)
- Shape: `{ _tag: "ProjectionStoreSetupError"; cause?: unknown }`

<a id="schema-projectionstorethreadnotfounderror"></a>

## `ProjectionStoreThreadNotFoundError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:170](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L170-L179)
- Shape: `{ _tag: "ProjectionStoreThreadNotFoundError"; threadId: makeEntityId }`

<a id="schema-projectionstorev2error"></a>

## `ProjectionStoreV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:193](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L193-L198)
- Shape: `ProjectionStoreSetupError | ProjectionStoreApplyEventError | ProjectionStoreThreadNotFoundError | ProjectionStoreReadError`

<a id="schema-provideradapterregistrylookuperror"></a>

## `ProviderAdapterRegistryLookupError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderAdapterRegistry.ts:21](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderAdapterRegistry.ts#L21-L33)
- Shape: `{ _tag: "ProviderAdapterRegistryLookupError"; instanceId: TrimmedNonEmptyString }`

<a id="schema-provideradapterregistrymetadataerror"></a>

## `ProviderAdapterRegistryMetadataError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderAdapterRegistry.ts:35](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderAdapterRegistry.ts#L35-L38)
- Shape: `{ _tag: "ProviderAdapterRegistryMetadataError"; instanceId: TrimmedNonEmptyString; cause: unknown }`

<a id="schema-provideradapterregistryv2error"></a>

## `ProviderAdapterRegistryV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderAdapterRegistry.ts:40](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderAdapterRegistry.ts#L40-L44)
- Shape: `ProviderAdapterRegistryLookupError | ProviderAdapterRegistryMetadataError | ProviderAdapterDriverCreateError`

<a id="schema-providereventingestorv2error"></a>

## `ProviderEventIngestorV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderEventIngestor.ts:82](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderEventIngestor.ts#L82-L85)
- Shape: `ProviderEventNormalizeError | ProviderEventPublishError`

<a id="schema-providereventnormalizeerror"></a>

## `ProviderEventNormalizeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderEventIngestor.ts:46](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderEventIngestor.ts#L46-L59)
- Shape: `{ _tag: "ProviderEventNormalizeError"; providerSessionId: makeEntityId; threadId: makeEntityId; eventType: string; cause?: unknown }`

<a id="schema-providereventpublisherror"></a>

## `ProviderEventPublishError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderEventIngestor.ts:61](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderEventIngestor.ts#L61-L72)
- Shape: `{ _tag: "ProviderEventPublishError"; providerSessionId: makeEntityId; eventCount: number; cause?: unknown }`

<a id="schema-providerruntimerecoveryerror"></a>

## `ProviderRuntimeRecoveryError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderRuntimeRecoveryService.ts:47](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderRuntimeRecoveryService.ts#L47-L58)
- Shape: `{ _tag: "ProviderRuntimeRecoveryError"; operation: "read-projections" | "reconcile" | "drain-outbox"; threadId?: makeEntityId; cause: unknown }`

<a id="schema-providersessionactivityerror"></a>

## `ProviderSessionActivityError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionManager.ts:238](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionManager.ts#L238-L248)
- Shape: `{ _tag: "ProviderSessionActivityError"; providerSessionId: makeEntityId; cause?: unknown }`

<a id="schema-providersessioncloseerror"></a>

## `ProviderSessionCloseError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionManager.ts:213](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionManager.ts#L213-L223)
- Shape: `{ _tag: "ProviderSessionCloseError"; providerSessionId: makeEntityId; cause?: unknown }`

<a id="schema-providersessionlookuperror"></a>

## `ProviderSessionLookupError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionManager.ts:201](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionManager.ts#L201-L211)
- Shape: `{ _tag: "ProviderSessionLookupError"; providerSessionId: makeEntityId; cause?: unknown }`

<a id="schema-providersessionmanagerv2error"></a>

## `ProviderSessionManagerV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionManager.ts:250](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionManager.ts#L250-L257)
- Shape: `ProviderSessionOpenError | ProviderWorkspaceMissingError | ProviderSessionLookupError | ProviderSessionCloseError | ProviderSessionReleaseError | ProviderSessionActivityError`

<a id="schema-providersessionopenerror"></a>

## `ProviderSessionOpenError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionManager.ts:188](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionManager.ts#L188-L199)
- Shape: `{ _tag: "ProviderSessionOpenError"; instanceId: TrimmedNonEmptyString; providerSessionId: makeEntityId; cause?: unknown }`

<a id="schema-providersessionreleaseerror"></a>

## `ProviderSessionReleaseError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionManager.ts:225](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionManager.ts#L225-L236)
- Shape: `{ _tag: "ProviderSessionReleaseError"; providerSessionId: makeEntityId; reason: ProviderSessionReleaseReason; cause?: unknown }`

<a id="schema-providersessionreleasereason"></a>

## `ProviderSessionReleaseReason`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionManager.ts:160](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionManager.ts#L160-L165)
- Shape: `"idle_timeout" | "runtime_error" | "manual_shutdown" | "server_shutdown"`

<a id="schema-providersessiontransition"></a>

## `ProviderSessionTransition`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSessionTransitionPolicy.ts:12](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSessionTransitionPolicy.ts#L12)
- Shape: `{ type: "reuse" } | { type: "switch_model_in_session" } | { type: "restart_and_resume" } | { type: "create_with_handoff" } | { type: "reject"; reason: string }`

<a id="schema-providerswitchplanerror"></a>

## `ProviderSwitchPlanError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderSwitchService.ts:27](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderSwitchService.ts#L27-L34)
- Shape: `{ _tag: "ProviderSwitchPlanError"; threadId: makeEntityId; targetProviderInstanceId: string; cause?: unknown }`

<a id="schema-providerturncontrolerror"></a>

## `ProviderTurnControlError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderTurnControlService.ts:38](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderTurnControlService.ts#L38-L50)
- Shape: `{ _tag: "ProviderTurnControlError"; threadId: makeEntityId; operation: "interrupt" | "restart" | "steer"; providerTurnId: makeEntityId; turnCompleted?: boolean; steerDeclined?: boolean; unresponsive?: boolean; cause?: unknown }`

<a id="schema-providerturnstarterror"></a>

## `ProviderTurnStartError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderTurnStartService.ts:100](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderTurnStartService.ts#L100-L108)
- Shape: `{ _tag: "ProviderTurnStartError"; runId: makeEntityId; cause?: unknown; attemptId?: makeEntityId; rootNodeId?: makeEntityId }`

<a id="schema-providerturnstartrunstatemissingerror"></a>

## `ProviderTurnStartRunStateMissingError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderTurnStartService.ts:351](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderTurnStartService.ts#L351-L356)
- Shape: `{ _tag: "ProviderTurnStartRunStateMissingError"; runId: makeEntityId }`

<a id="schema-pullrequestwatchchange"></a>

## `PullRequestWatchChange`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/pullRequestWatch.ts:17](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/pullRequestWatch.ts#L17)
- Shape: `{ kind: "checks-failed"; failed: PullRequestCheck[] } | { kind: "checks-passed"; count: number; required: boolean } | { kind: "checks-finished"; passed: number; failing: PullRequestCheck[] } | { kind: "checks-awaiting-approval"; checks: PullRequestCheck[] } | { kind: "remarks"; remarks: PullRequestComment[] } | { kind: "no-checks"; minutes: number } | { kind: "conflicting" } | { kind: "needs-rebase" } | { kind: "merge-queue-removed"; reason: string | null }`

<a id="schema-resourcecleanuperror"></a>

## `ResourceCleanupError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ResourceCleanupService.ts:16](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ResourceCleanupService.ts#L16-L24)
- Shape: `{ _tag: "ResourceCleanupError"; operation: "terminal" | "preview" | "device" | "attachment" | "scheduled-tasks"; threadId?: string; attachmentId?: string; cause: unknown }`

<a id="schema-runexecutioningesterror"></a>

## `RunExecutionIngestError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RunExecutionService.ts:620](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RunExecutionService.ts#L620-L630)
- Shape: `{ _tag: "RunExecutionIngestError"; runId: string; cause?: unknown }`

<a id="schema-runexecutionservicev2error"></a>

## `RunExecutionServiceV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RunExecutionService.ts:633](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RunExecutionService.ts#L633-L636)
- Shape: `RunExecutionStartError | RunExecutionIngestError`

<a id="schema-runexecutionstarterror"></a>

## `RunExecutionStartError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RunExecutionService.ts:605](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RunExecutionService.ts#L605-L616)
- Shape: `{ _tag: "RunExecutionStartError"; commandId: makeEntityId; runId: string; cause?: unknown }`

<a id="schema-runfinalizationerror"></a>

## `RunFinalizationError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RunFinalizationService.ts:20](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RunFinalizationService.ts#L20-L29)
- Shape: `{ _tag: "RunFinalizationError"; threadId: makeEntityId; runId: makeEntityId; scopeId: makeEntityId; operation: "capture-checkpoint" | "refresh-workspace"; cause: unknown }`

<a id="schema-runfinalizationrefresherror"></a>

## `RunFinalizationRefreshError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RunFinalizationService.ts:31](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RunFinalizationService.ts#L31-L34)
- Shape: `{ _tag: "RunFinalizationRefreshError"; cwd: string; cause: unknown }`

<a id="schema-runtimepolicyaboveceilingerror"></a>

## `RuntimePolicyAboveCeilingError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RuntimePolicy.ts:41](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RuntimePolicy.ts#L41-L53)
- Shape: `{ _tag: "RuntimePolicyAboveCeilingError"; threadId: makeEntityId; runtimeMode: RuntimeMode; maxRuntimeMode: RuntimeMode; organization: string }`

<a id="schema-runtimepolicyresolveerror"></a>

## `RuntimePolicyResolveError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RuntimePolicy.ts:23](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RuntimePolicy.ts#L23-L34)
- Shape: `{ _tag: "RuntimePolicyResolveError"; projectId: makeEntityId; providerInstanceId: TrimmedNonEmptyString; cause?: unknown }`

<a id="schema-runtimepolicyv2error"></a>

## `RuntimePolicyV2Error`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RuntimePolicy.ts:57](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RuntimePolicy.ts#L57-L60)
- Shape: `RuntimePolicyResolveError | RuntimePolicyAboveCeilingError`

<a id="schema-runtimepolicyv2override"></a>

## `RuntimePolicyV2Override`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RuntimePolicy.ts:63](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RuntimePolicy.ts#L63-L68)
- Shape: `{ cwd?: string; approvalPolicy?: unknown; sandboxPolicy?: unknown; reasoningEffort?: string }`

<a id="schema-runtimerequestresponseexecutionerror"></a>

## `RuntimeRequestResponseExecutionError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RuntimeRequestService.ts:17](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RuntimeRequestService.ts#L17-L47)
- Shape: `{ _tag: "RuntimeRequestResponseExecutionError"; reason: "request-missing" | "request-not-ready" | "request-not-resumable" | "provider-session-not-active" | "unexpected-failure"; threadId: makeEntityId; providerSessionId: makeEntityId; requestId: makeEntityId; cause?: unknown }`

<a id="schema-steeringexecutionpolicyv2"></a>

## `SteeringExecutionPolicyV2`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/CommandPolicy.ts:20](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/CommandPolicy.ts#L20)
- Shape: `"active_steering" | "interrupt_restart"`

<a id="schema-threadforkplanerror"></a>

## `ThreadForkPlanError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadForkService.ts:25](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadForkService.ts#L25-L32)
- Shape: `{ _tag: "ThreadForkPlanError"; sourceThreadId: makeEntityId; targetThreadId: makeEntityId; cause?: unknown }`

<a id="schema-threadimportotherlinkerror"></a>

## `ThreadImportOtherLinkError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadImportService.ts:53](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadImportService.ts#L53-L60)
- Shape: `{ _tag: "ThreadImportOtherLinkError"; threadId: makeEntityId }`

<a id="schema-threadimportprojectmismatcherror"></a>

## `ThreadImportProjectMismatchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadImportService.ts:43](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadImportService.ts#L43-L50)
- Shape: `{ _tag: "ThreadImportProjectMismatchError"; threadId: makeEntityId; existingProjectId: makeEntityId }`

<a id="schema-threadimportwriteerror"></a>

## `ThreadImportWriteError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadImportService.ts:33](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadImportService.ts#L33-L40)
- Shape: `{ _tag: "ThreadImportWriteError"; threadId: makeEntityId; cause: unknown }`

<a id="schema-threadlaunchbasereferror"></a>

## `ThreadLaunchBaseRefError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadLaunchService.ts:187](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadLaunchService.ts#L187-L200)
- Shape: `{ _tag: "ThreadLaunchBaseRefError"; projectId: makeEntityId; projectTitle: string; workspaceRoot: string; baseRef: string; cause?: unknown }`

<a id="schema-threadlaunchbranchconflicterror"></a>

## `ThreadLaunchBranchConflictError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadLaunchService.ts:215](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadLaunchService.ts#L215-L227)
- Shape: `{ _tag: "ThreadLaunchBranchConflictError"; projectId: makeEntityId; projectTitle: string; branch: string; conflictingBranch: string }`

<a id="schema-threadlaunchbranchexistserror"></a>

## `ThreadLaunchBranchExistsError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadLaunchService.ts:202](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadLaunchService.ts#L202-L213)
- Shape: `{ _tag: "ThreadLaunchBranchExistsError"; projectId: makeEntityId; projectTitle: string; branch: string }`

<a id="schema-threadlauncherror"></a>

## `ThreadLaunchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadLaunchService.ts:161](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadLaunchService.ts#L161-L185)
- Shape: `{ _tag: "ThreadLaunchError"; operation: "resolve-project" | "read-receipt" | "generate-metadata" | "provision-worktree" | "run-setup-script" | "create-thread" | "update-thread" | "dispatch-message" | "release-run" | "fail-run"; commandId: makeEntityId; projectId: makeEntityId; threadId?: makeEntityId; cause: unknown }`

<a id="schema-threadlaunchnotrepositoryerror"></a>

## `ThreadLaunchNotRepositoryError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadLaunchService.ts:229](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadLaunchService.ts#L229-L240)
- Shape: `{ _tag: "ThreadLaunchNotRepositoryError"; projectId: makeEntityId; projectTitle: string; workspaceRoot: string }`

<a id="schema-threadlaunchrepositoryunusableerror"></a>

## `ThreadLaunchRepositoryUnusableError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadLaunchService.ts:242](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadLaunchService.ts#L242-L254)
- Shape: `{ _tag: "ThreadLaunchRepositoryUnusableError"; projectId: makeEntityId; projectTitle: string; workspaceRoot: string; cause: unknown }`

<a id="schema-threadlaunchworkspacestrategy"></a>

## `ThreadLaunchWorkspaceStrategy`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadLaunchService.ts:79](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadLaunchService.ts#L79)
- Shape: `{ type: "root"; branch?: string | undefined } | { type: "existing_worktree"; worktreePath: string; branch?: string | undefined } | { type: "worktree"; baseRef: string; branch?: string | undefined; startFromOrigin?: boolean | undefined; repositories?: { path: string }[] | undefined }`

<a id="schema-threadmanagementbackgroundwaiterror"></a>

## `ThreadManagementBackgroundWaitError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:383](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L383-L403)
- Shape: `{ _tag: "ThreadManagementBackgroundWaitError"; threadId: makeEntityId; reason: "unsupported" | "unavailable" | "failed" | "unmatched"; cause?: unknown }`

<a id="schema-threadmanagementdurablerunprojectionerror"></a>

## `ThreadManagementDurableRunProjectionError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:346](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L346-L356)
- Shape: `{ _tag: "ThreadManagementDurableRunProjectionError"; threadId: makeEntityId; messageId: makeEntityId }`

<a id="schema-threadmanagementerror"></a>

## `ThreadManagementError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:405](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L405-L417)
- Shape: `ThreadManagementThreadNotFoundError | ThreadManagementRunNotFoundError | ThreadManagementThreadArchivedError | ThreadManagementNoSteerableRunError | ThreadManagementRunOutputRejectedError | ThreadManagementThreadNotInterruptibleError | ThreadManagementProjectionLoadError | ThreadManagementProjectThreadsListError | ThreadManagementDurableRunProjectionError | ThreadManagementProviderInstanceDisabledError | ThreadManagementWorktreeRestoreError`

<a id="schema-threadmanagementinterruptresult"></a>

## `ThreadManagementInterruptResult`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:225](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L225)
- Shape: `{ type: "interrupt_requested"; run: OrchestrationV2Run; dispatch: Orchestrator.OrchestratorV2DispatchResult } | { type: "no_active_run" } | { type: "already_terminal"; run: OrchestrationV2Run & { status: ThreadManagementTerminalRunStatus } }`

<a id="schema-threadmanagementnosteerablerunerror"></a>

## `ThreadManagementNoSteerableRunError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:281](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L281-L291)
- Shape: `{ _tag: "ThreadManagementNoSteerableRunError"; threadId: makeEntityId; mode: "steer" | "restart" }`

<a id="schema-threadmanagementprojectthreadslisterror"></a>

## `ThreadManagementProjectThreadsListError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:332](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L332-L344)
- Shape: `{ _tag: "ThreadManagementProjectThreadsListError"; projectId?: makeEntityId; cause: unknown }`

<a id="schema-threadmanagementprojectionloaderror"></a>

## `ThreadManagementProjectionLoadError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:319](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L319-L330)
- Shape: `{ _tag: "ThreadManagementProjectionLoadError"; projectId: makeEntityId; threadId: makeEntityId; cause: unknown }`

<a id="schema-threadmanagementproviderinstancedisablederror"></a>

## `ThreadManagementProviderInstanceDisabledError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:371](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L371-L381)
- Shape: `{ _tag: "ThreadManagementProviderInstanceDisabledError"; projectId: makeEntityId; instanceId: TrimmedNonEmptyString }`

<a id="schema-threadmanagementrunnotfounderror"></a>

## `ThreadManagementRunNotFoundError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:258](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L258-L268)
- Shape: `{ _tag: "ThreadManagementRunNotFoundError"; threadId: makeEntityId; runId: makeEntityId }`

<a id="schema-threadmanagementrunoutputrejectederror"></a>

## `ThreadManagementRunOutputRejectedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:293](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L293-L305)
- Shape: `{ _tag: "ThreadManagementRunOutputRejectedError"; threadId: makeEntityId; problem: string; cause?: unknown }`

<a id="schema-threadmanagementthreadarchivederror"></a>

## `ThreadManagementThreadArchivedError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:270](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L270-L279)
- Shape: `{ _tag: "ThreadManagementThreadArchivedError"; threadId: makeEntityId }`

<a id="schema-threadmanagementthreadnotfounderror"></a>

## `ThreadManagementThreadNotFoundError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:237](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L237-L247)
- Shape: `{ _tag: "ThreadManagementThreadNotFoundError"; projectId: makeEntityId; threadId: makeEntityId }`

<a id="schema-threadmanagementthreadnotinterruptibleerror"></a>

## `ThreadManagementThreadNotInterruptibleError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:307](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L307-L317)
- Shape: `{ _tag: "ThreadManagementThreadNotInterruptibleError"; threadId: makeEntityId; runId: makeEntityId }`

<a id="schema-threadmanagementworktreerestoreerror"></a>

## `ThreadManagementWorktreeRestoreError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:358](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L358-L369)
- Shape: `{ _tag: "ThreadManagementWorktreeRestoreError"; threadId: makeEntityId; cause: unknown }`

<a id="schema-threadresumeplan"></a>

## `ThreadResumePlan`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadStream.ts:91](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadStream.ts#L91)
- Shape: `{ mode: "replay"; afterSequence: number; throughSequence: number } | { mode: "snapshot" }`

<a id="schema-threadsearcherror"></a>

## `ThreadSearchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadSearch.ts:69](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadSearch.ts#L69-L79)
- Shape: `{ _tag: "ThreadSearchError"; operation: "query" | "decode"; cause: unknown }`

<a id="schema-threadtranscripttoolargeerror"></a>

## `ThreadTranscriptTooLargeError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ThreadManagementService.ts:249](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ThreadManagementService.ts#L249-L256)
- Shape: `{ _tag: "ThreadTranscriptTooLargeError"; threadId: makeEntityId }`

<a id="schema-turnitempositionstoreerror"></a>

## `TurnItemPositionStoreError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/TurnItemPositionStore.ts:8](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/TurnItemPositionStore.ts#L8-L15)
- Shape: `{ _tag: "TurnItemPositionStoreError"; threadId: makeEntityId; turnItemId: makeEntityId; cause?: unknown }`

<a id="schema-decodeprojectcommandrejection"></a>

## `decodeProjectCommandRejection`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectCommands.ts:102](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectCommands.ts#L102-L104)
- Shape: `Schema.decodeUnknownOption`

<a id="schema-encodeprojectcommandrejection"></a>

## `encodeProjectCommandRejection`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectCommands.ts:101](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectCommands.ts#L101)
- Shape: `Schema.encodeSync`

<a id="schema-encodeproviderthreadpayload"></a>

## `encodeProviderThreadPayload`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:1437](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L1437-L1439)
- Shape: `Schema.encodeEffect`

<a id="schema-encodesubagentpayload"></a>

## `encodeSubagentPayload`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:1431](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L1431-L1433)
- Shape: `Schema.encodeEffect`

<a id="schema-encodeturnitempayload"></a>

## `encodeTurnItemPayload`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProjectionStore.ts:1452](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProjectionStore.ts#L1452-L1454)
- Shape: `Schema.encodeEffect`

<a id="schema-iscommitbatcherror"></a>

## `isCommitBatchError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderCommitBatch.ts:74](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderCommitBatch.ts#L74)
- Shape: `Schema.is`

<a id="schema-isproviderturnstarterror"></a>

## `isProviderTurnStartError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderTurnStartService.ts:244](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderTurnStartService.ts#L244)
- Shape: `Schema.is`

<a id="schema-isproviderturnstartrunstatemissingerror"></a>

## `isProviderTurnStartRunStateMissingError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/ProviderTurnStartService.ts:358](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/ProviderTurnStartService.ts#L358-L360)
- Shape: `Schema.is`

<a id="schema-isruntimepolicyaboveceilingerror"></a>

## `isRuntimePolicyAboveCeilingError`

- Kind: schema
- Workspace: [t3](../../architecture/t3.md)
- Source: [apps/server/src/orchestration-v2/RuntimePolicy.ts:55](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/apps/server/src/orchestration-v2/RuntimePolicy.ts#L55)
- Shape: `Schema.is`
