Skip to content
providerkit
GitHub

RunState

type RunState =
| {
status: "running";
}
| {
candidate: unknown;
status: "completed";
}
| {
status: "suspended";
}
| {
status: "cancelled";
}
| {
limit: LimitReason;
status: "limited";
}
| {
error: RunFailure;
status: "failed";
};

Defined in: agents/src/types.ts:889

{
status: "running";
}

{
candidate: unknown;
status: "completed";
}

Saves the original result input, not a validator’s potentially non-JSON return value. After a handoff this is the active target’s candidate, validated only by that target.


{
status: "suspended";
}

{
status: "cancelled";
}

{
limit: LimitReason;
status: "limited";
}

{
error: RunFailure;
status: "failed";
}