{"slug": "turn-har-files-claude-code-copilot-cli-and-codex-cli-logs-into-atif", "title": "Turn HAR Files, Claude Code, Copilot CLI, and Codex CLI Logs into ATIF", "summary": "The Harbor Framework released atifact, a command-line tool that converts HAR files, Claude Code logs, Copilot CLI logs, and Codex CLI logs into standardized ATIF v1.7 trajectory JSON format with a single command and zero dependencies. The tool supports auto-detection of input formats and can output trajectories for debugging, visualization, fine-tuning, and reinforcement learning pipelines, with options for file output or JSON piping to stdout.", "body_md": "Convert agent logs to [ATIF](https://harborframework.com/docs/agents/trajectory-format) trajectories. One command. Zero dependencies.\n\nTurn HAR files, Claude Code logs, Copilot CLI logs, and Codex CLI logs into standardized [ATIF v1.7](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md) trajectory JSON — ready for debugging, visualization, fine-tuning, and RL pipelines.\n\nGive your AI coding agent the atifact skill so it can extract trajectories on your behalf:\n\n```\nnpx skills add waldekmastykarz/atifact\n```\n\nOnce installed, ask your agent to *\"extract the trajectory from this HAR file\"*, *\"convert Claude Code logs to ATIF\"*, *\"convert Copilot CLI logs\"*, or *\"convert Codex CLI logs\"* and it will handle the rest.\n\n```\nnpm install -g atifact\n# Convert a HAR file (auto-detected)\natifact session.har\n\n# Convert Claude Code logs\natifact claude-log.jsonl\n\n# Convert Copilot CLI logs\natifact copilot-session.jsonl\n\n# Convert Codex CLI logs\natifact codex-session.jsonl\n\n# Pipe to stdout (returns JSON array of trajectories)\natifact session.har --json | jq '.steps | length'\n```\n\nOutput: `<input>.trajectory.json`\n\nin ATIF v1.7 format. Copilot CLI and Codex CLI logs with subagents produce additional `<input>.trajectory.<name>.json`\n\nfiles.\n\n`--json`\n\nmode outputs a single trajectory with subagents embedded in the `subagent_trajectories`\n\narray to stdout with no files written.\n\n| Format | Source | Flag |\n|---|---|---|\n| HAR | OpenAI Chat Completions API, OpenAI Responses API, Anthropic Messages API | `har` |\n| JSONL | Claude Code CLI session logs | `claude-code-jsonl` |\n| JSONL | Copilot CLI session logs | `copilot-cli-jsonl` |\n| JSONL | Codex CLI `exec --json` logs |\n`codex-cli-jsonl` |\n\nFormat is auto-detected from file contents (not extension). Force it with `-f`\n\n:\n\n```\natifact myfile.log -f claude-code-jsonl\natifact myfile.log -f copilot-cli-jsonl\natifact myfile.log -f codex-cli-jsonl\natifact <input-file> [options]\n```\n\n| Option | Description |\n|---|---|\n`-o, --output <prefix>` |\nOutput path prefix (default: input file path). Main: `<prefix>.trajectory.json` , subagents: `<prefix>.trajectory.<name>.json` |\n`-f, --format <fmt>` |\nForce input format: `har` , `claude-code-jsonl` , `copilot-cli-jsonl` , `codex-cli-jsonl` |\n`--json` |\nWrite trajectory to stdout with subagents embedded (no files written) |\n`-q, --quiet` |\nSuppress progress messages |\n`-h, --help` |\nShow help |\n`--version` |\nPrint version |\n\n| Code | Meaning |\n|---|---|\n`0` |\nSuccess |\n`1` |\nRuntime error (parse failure, I/O error) |\n`2` |\nInvalid usage (bad arguments, missing file) |\n\natifact produces [ATIF v1.7](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md) JSON with:\n\n**Steps**— user messages, agent responses, tool calls, and observations** Metrics**— token counts, costs, cached tokens per step** Tool calls**— structured function name + arguments with observation results** Subagent trajectories**— Copilot CLI and Codex CLI subagents produce separate trajectory files linked via`subagent_trajectory_ref`\n\nwith`trajectory_id`\n\nresolution;`--json`\n\nmode embeds them in`subagent_trajectories`\n\n**Final metrics**— aggregated totals across the trajectory- All timestamps preserved as ISO 8601 from source data\n- Null/undefined fields excluded for compact output\n\n```\natifact recording.har -o my-trajectory\n# Writes: my-trajectory.trajectory.json\natifact ~/.claude/projects/*/sessions/*.jsonl --json --quiet > trajectory.json\natifact copilot-session.jsonl\n# Writes: copilot-session.jsonl.trajectory.json\n# Writes: copilot-session.jsonl.trajectory.<subagent-name>.json (per subagent)\natifact codex-session.jsonl\n# Writes: codex-session.jsonl.trajectory.json\natifact session.har --json | jq '[.steps[] | select(.source == \"agent\")] | length'\n```\n\n- Node.js 22+", "url": "https://wpnews.pro/news/turn-har-files-claude-code-copilot-cli-and-codex-cli-logs-into-atif", "canonical_source": "https://github.com/waldekmastykarz/atifact", "published_at": "2026-06-06 07:24:54+00:00", "updated_at": "2026-06-06 07:46:22.007215+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "ai-infrastructure", "mlops", "large-language-models"], "entities": ["ATIF", "Harbor Framework", "Claude Code", "Copilot CLI", "Codex CLI", "OpenAI", "GitHub", "Waldek Mastykarz"], "alternates": {"html": "https://wpnews.pro/news/turn-har-files-claude-code-copilot-cli-and-codex-cli-logs-into-atif", "markdown": "https://wpnews.pro/news/turn-har-files-claude-code-copilot-cli-and-codex-cli-logs-into-atif.md", "text": "https://wpnews.pro/news/turn-har-files-claude-code-copilot-cli-and-codex-cli-logs-into-atif.txt", "jsonld": "https://wpnews.pro/news/turn-har-files-claude-code-copilot-cli-and-codex-cli-logs-into-atif.jsonld"}}