Concepts

Branches And Interventions

How hypotheses become checkpoint forks and targeted controlled changes.

A branch is a hypothesis fork. It references a base run, a checkpoint, a replay policy, and one or more interventions. It is not a full copy of the run.

Branch Shape

FieldMeaning
baseRunIdThe observed run being tested.
checkpointIdThe restart or comparison point.
parentBranchIdOptional branch lineage.
nameHuman-readable hypothesis name.
replayPolicyDefault model/tool/drift policy for replays from this branch.

Intervention Kinds

KindTypical use
context_maskHide a context item.
message_patchPatch system, developer, user, assistant, or tool message content.
prompt_patchPatch a prompt artifact or prompt-like event.
prompt_clause_maskRemove or mask one instruction clause.
memory_maskRemove memory from replayed context.
state_maskHide state while preserving structure.
state_patchChange one state field.
tool_args_patchChange tool proposal or execution args.
tool_maskRemove or block a tool.
tool_schema_edit / tool_schema_patchChange tool descriptions or parameters.
tool_result_substitutionReplace a tool output with explicit evidence.
retrieval_substitutionSwap one retrieved chunk or result set.
model_config_patch / model_config_changeChange model provider/settings.
policy_overrideChange replay policy inside a controlled experiment.
input_patchPatch original user or task input.
human_decision_substitutionReplace an approval or human decision.
latency_or_error_injectionSimulate delay or failure.
checkpoint_resumeResume from a named alternate state snapshot.

Targeting

Interventions can target by event ID, refId, event type, tool name, model call ID, artifact ID, JSON pointer, or context item identity depending on the route or experiment input. Prefer the most specific stable target available.

One hypothesis, one branch

Bundle interventions only when the hypothesis itself requires the bundle. If you remove a prompt clause, change a model setting, and substitute a tool result in the same branch, a changed replay no longer isolates which change mattered.

Patch Semantics

Patch payloads can be direct replacements, shallow object merges, or operation arrays. Experiment inputs support JSON Patch operations plus replace_text and mask_span.

Use expectedBaseHash in experiment specs when you are targeting a specific context item or artifact content. It prevents silently applying a patch to a stale or changed baseline.

On this page