Relationships
#4323 Agent session record: four questions from the Codex importer (#4158)
Opened by skunk-ape · 11/2/2026
Follow-up to #4154, found while importing real Codex 0.166 rollouts into the v2 record (#4158). Nothing was changed locally; the Codex importer fits v2 as it stands. Each needs a decision in the record contract (swamp core), then a re-copy into @swamp/agent-sessions.
Reasoning tokens have no field. OpenAI usage reports reasoning_output_tokens separately (136 of 3,298 output tokens across the six captured sessions). The importer folds them into output, as OpenAI's output_tokens already does. Add an optional tokens.reasoning, or document that output includes reasoning?
Calls nested in one tool call are flattened. Codex's model runs shell through exec, a tool whose input is a script that calls exec_command and apply_patch, often several per exec. The importer writes each command and each patched file as its own call and drops exec itself. The record has no way to say several calls came from one model tool call. Is flat enough, or should a call carry an optional parent call id?
The turn doc comment says a turn is one model response and the tool calls it made. Both importers write one turn per prompt (Claude Code since #4156, Codex from task_started to task_complete), each with several model responses. Fix the comment, or is the intent different?
A subagent has no display name. Codex names each agent (agent_nickname, e.g. Carver) besides its task path (/root/git, written as agentId) and its role (agent_role, often null, written as agentType when set). Worth an optional agentName, or leave it out?
Open
No activity in this phase yet.
Sign in to post a ripple.