Skip to content

Interface: ForkContext ​

Defined in: ports/fork-context.ts:27

Context passed to ModelDriver.prepareFork() when initializing a downward child fork, speculative branch, or cross-model P.loop retry escalation.

Supplies the parent wire frame chain, fork point message ID, history mode, compiled prefix, and assistant turn-batch pairing metadata.

Properties ​

PropertyModifierTypeDescriptionDefined in
childRoleContextFrameText?readonlystringOptional [ROLE_AND_SCOPE_CONTEXT] text (omitted on same-actor P.loop cross-model escalations).ports/fork-context.ts:39
childTaskPromptText?readonlystringOptional formatted task prompt for the child fork.ports/fork-context.ts:47
forkCallId?readonlystringOptional callId of the .fork() tool call when branching mid-assistant-turn in 'clone-transcript' mode.ports/fork-context.ts:41
forkPointMessageIdreadonlystring | nullLeaf message ID in parentChain at which the fork branches, or null for clean start.ports/fork-context.ts:33
historyModereadonly"shared-prefix-only" | "clone-transcript"Transcript inheritance mode ('shared-prefix-only' vs 'clone-transcript').ports/fork-context.ts:29
parentChainreadonlyreadonly WireFrameRecord[]Ordered parent WireFrameRecord chain up to forkPointMessageId.ports/fork-context.ts:31
precedingCompletedResults?readonlyreadonly PrecedingCompletedToolResult[]Optional results of preceding regular tool calls (1..m) completed before the fork batch.ports/fork-context.ts:45
roleKey?readonlystringOptional canonical roleKey of the target actor.ports/fork-context.ts:37
siblingForkCallIds?readonlyreadonly string[]Optional sibling .fork() tool call IDs in the same assistant turn batch.ports/fork-context.ts:43
wirePrefix?readonlyCompiledWirePrefixOptional compiled wire prefix governing the session.ports/fork-context.ts:35

Released under the MIT License.