termination_reason; Trajectory does not infer it from model replies.
Log a valid native grade, including zero, before calling
client.trajectories.complete(tid, termination_reason=...). The harness can exit after calling complete.
The trajectory platform can also record
LIMIT_REACHED for token or context limits, MAX_STEPS for
its turn limit, and STALE, CANCELLED, or SANDBOX_* for execution failures. We preserve
a platform ending event even if the harness later calls complete(). The
completion API reference lists all
reasons.
Training
Training utilizes gradedENV_DONE trajectories by default. Training option train_on_truncation
opts into utilizing truncated trajectories, including ones that hit token limits, turn limits, and missing submissions;
train_on_timeout opts into timeouts; train_on_error opts into execution errors, grading
errors, and missing grades. All three default to false. Be aware that when density_aware_training is on,
it sets train_on_truncation to true.
Evaluations
Trajectories withLIMIT_REACHED and MAX_STEPS show up as TRUNCATION errors. These are given a reward
of zero if ungraded and cap positive rewards at zero.
SANDBOX_* are labeled as ERROR which counts as failed in an eval (even when training admits it).
Additionally it counts toward the training failure limit unless train_on_error is enabled.
Helpful Harness Tips
Checkresponse.choices[0].finish_reason before dispatching tool calls. A value of
"length" or "max_tokens" means the reply was cut off - do not execute tool calls from
that reply. If you grade the partial answer, log its native grade and
complete with TRUNCATION.
After a platform limit (turn, token, context), model requests may return an empty
reply with metadata.trajectory_termination_reason: "trajectory_cancelled". Inspect the
recorded reason on the trajectory.
When setting training options, leave room between max_output_tokens_per_turn and max_output_tokens_per_trajectory,
especially if the harness must grade a reply that fills its per-turn allowance.