1
Find the local session log
Both SDKs write local JSONL logs on the machine running the SDK:Choose the file for your run. Its first A dashboard trace download contains parsed events, not the local harness stream. Do not pass it to this example.
_meta record contains the agent, model, session tag, and timestamp. _prompt.text records the input.Use a fresh Codex or Claude instance with one foreground
run(), no resumed context, and no shell commands. After it returns exitCode: 0, call kill() to close and flush the log.2
Package one recorded run
Save the script below as Replace the session filename and task name. Use the actual task key if you plan to link a dataset.For Claude, the original log goes under
Have verifier results? Add
pack-sdk-run.py. It uses Python’s standard library and works with local logs from either SDK.agent/.claude/projects/sdk-upload/ instead.Copy the packaging script
Copy the packaging script
--rewards ./recorded-rewards.json, containing the verifier’s numeric score map. Without it, the import has no score. Finishing an agent run does not prove that the task passed.The script preserves the transcript. It does not collect sandbox files or infer costs, errors, or rewards. Add any recorded deliverables under artifacts/, verifier logs under verifier/, and known result fields using the job layout.3
Upload the job folder
4
Inspect the imported run
Set Set Check that the trial has the expected task, agent, model, prompt, and agent activity. Read the import report for skipped trials or missing task links. Then analyze it:Uploaded jobs support analysis. They cannot be resumed, retried, or regraded.
$JOB_ID to the returned ID:$TRIAL_ID to a trial ID from that list, then read its trace:Other session formats
A failed or interrupted run
A failed or interrupted run
Failed runs can also be uploaded. Use the same job layout, preserve the transcript, and include the recorded
exception_info when available. The example script stops when a successful harness completion is missing; closing a session alone does not prove completion.Do not invent a reward or an exception from missing data. Without a recorded score or recognized failure, the imported trial is INDETERMINATE.A session with several runs or commands
A session with several runs or commands
A session is not automatically one trial. Choose the completed agent run and its task before packaging. SDK
_prompt records can mark runs or shell commands; they do not identify which kind occurred.Separate each evaluation attempt using the original call history and its transcript. Preserve any earlier conversation the attempt depended on. The example refuses combined logs because splitting on _prompt alone can misrepresent the run.A system prompt, another harness, or a dashboard download
A system prompt, another harness, or a dashboard download
Use a complete ATIF trajectory at
agent/trajectory.json when the source is not a recognized native transcript. ATIF is the shared trajectory format.The SDK logger does not add the configured systemPrompt to its header. If you retained it, include its actual text as a system step in the complete trajectory. Do not reconstruct an unknown prompt.When a recognized native transcript produces parsed events, Evolve uses those events and the opening user prompt; it does not merge in the rest of ATIF. To use your complete ATIF instead, keep original evidence under agent/source/, outside the recognized transcript paths.A dashboard session download contains parsed session events. Convert those records to ATIF rather than renaming the file as a Codex or Claude native transcript.
