Problem to solve
load_trajectory_with_fallback already rebuilds trajectories from claude-code.txt, cursor-cli.txt, and cline.txt when trajectory.json is empty. OpenCode and Codex tee their JSON streams to opencode.txt and codex.txt, but those files are not converted today.
OpenCode is a documented Tier 3 agent. When Harbor leaves trajectory.json absent or with empty steps[], the verifier writes "No trajectory or reconstructible agent log" and scoring collapses. The collector can spot runtime errors in opencode.txt, but it cannot recover tool calls for deterministic checks.
This is separate from #110, which is about mis-parsing native Codex exec inside an existing trajectory. Here we are reconstructing ATIF from agent log files.
Proposed approach
- Parse OpenCode
run --format=json events into ATIF steps (tool_use, text).
- Reuse that parser for Codex when the tee log is structured JSONL.
- Wire both into
load_trajectory_with_fallback after the existing claude/cursor/cline fallbacks.
- Keep the existing Harbor bundle copy path (
adapter.py already copies log_converters.py).
Fail closed on non-dict tool inputs so raw strings are not treated as shell commands.
Additional context
I did not find an open issue for this OpenCode trajectory gap. Regression tests cover read/bash tool calls, error-only logs, and the load_trajectory_with_fallback path.
Before submitting
Problem to solve
load_trajectory_with_fallbackalready rebuilds trajectories fromclaude-code.txt,cursor-cli.txt, andcline.txtwhentrajectory.jsonis empty. OpenCode and Codex tee their JSON streams toopencode.txtandcodex.txt, but those files are not converted today.OpenCode is a documented Tier 3 agent. When Harbor leaves
trajectory.jsonabsent or with emptysteps[], the verifier writes"No trajectory or reconstructible agent log"and scoring collapses. The collector can spot runtime errors inopencode.txt, but it cannot recover tool calls for deterministic checks.This is separate from #110, which is about mis-parsing native Codex
execinside an existing trajectory. Here we are reconstructing ATIF from agent log files.Proposed approach
run --format=jsonevents into ATIF steps (tool_use,text).load_trajectory_with_fallbackafter the existing claude/cursor/cline fallbacks.adapter.pyalready copieslog_converters.py).Fail closed on non-dict tool inputs so raw strings are not treated as shell commands.
Additional context
I did not find an open issue for this OpenCode trajectory gap. Regression tests cover read/bash tool calls, error-only logs, and the
load_trajectory_with_fallbackpath.Before submitting