Scaffolds
The scaffold describes the harness that produced a trajectory. Because each
harness logs a different shape, Raw → IM conversion is scaffold-specific.
Tracer's pinned
swe_data_process checkout
provides four converters.
Supported scaffolds
| Scaffold | --scaffold key | Converter |
|---|---|---|
| Claude Code | claude_code | convert_cc_to_im.py |
| OpenCode | open_code | convert_oc_to_im.py |
| OpenHands SDK | openhands_sdk | convert_openhands_sdk_to_im.py |
| Terminus-2 | terminus2 | convert_terminus2_to_im.py |
Automatic detection
With --scaffold auto, scripts/convert_trajectories.sh derives the key from
the current runtime_info.input.agent.name, for example
custom-claude-code → claude_code.
The long-running dashboard sync first tries to derive the scaffold from the
target job directory name and passes that value explicitly. If the name has no
known scaffold marker, the converter falls back to the current config's
agent.name.
You can always override detection by passing --scaffold <key> explicitly.
Pick the scaffold that matches the run
Converting a trajectory with the wrong scaffold key produces malformed IM
rows. Because a historical job may have been created with a different agent
than the current config, pass --scaffold explicitly in that case.
What a converter does
Each converter normalizes its scaffold's raw log into the shared IM schema:
- Extracts user/assistant/tool messages and normalizes tool calls into OpenAI
tool_calls. - Splits reasoning from actions where the scaffold separates them (for example Terminus-2's analysis/plan/command structure).
- Deduplicates repeated trajectory prefixes so a single clean sequence remains.
The result is a PangUML v2 IM record with normalized messages, tools, instance metadata, and score metadata. Downstream scoring and LF conversion can then be shared across scaffolds.