Repository navigation
Description
This was generated by AI during triage.
What happens
A Custom process Command's record has no Run metrics, and its header doesn't describe what ran. Seen on thirdshift 0.18.6 with a Custom process started on an issue (an Issue-branch worktree), whose Steps were a Claude Code skill session (opus, medium) and then delivery:
Field in .command.json |
Recorded | What happened |
|---|---|---|
run_metrics |
null |
a 4-hour run, with session tokens and a pull request |
harness / model / effort |
codex / gpt-6.1-sol / high (the User config's defaults) |
every session Step ran on claude / opus / medium |
issue |
null |
started on issue #1; the log says "removing in-progress from issue #1" |
pull_request |
null |
delivery opened and readied a pull request |
The Command log's header has the same mismatch: sessions run on codex · gpt-6.1-sol · high, then running step maker-checker-tdd with claude · opus · medium. The Step's .models.json is right ("harness":"claude","requested":"opus","observed":["claude-opus-5-5"]), and so is the Session trace, whose last result usage has the session's full totals, including Agent-tool subagents.
Cause
CommandRecord::finish in src/logs/command_record.rs computes Run metrics only for these kinds:
if matches!(self.kind.as_str(), "Run" | "Spec run" | "Base fix") {A Custom process Command has kind Process, so it never gets them. The header fields come from the Command's harness Choice when the record is created, before any Step chooses its own harness.
Why it matters
Experiment Arms (#1468) and any comparison of a Built-in process with a Custom process need the same measurements on both sides. Today a Custom process's time, tokens and cost can only be rebuilt by hand from its Session traces. The Console and thirdshift status also show its Command under the wrong harness and model.
Related
- Codex sessions miss native sub-agent tokens and record no observed Model #1651: Codex sessions record no observed Model and miss native sub-agent tokens.
- Run metrics miss the tokens of agent CLIs a session starts itself #1639: agent CLIs a session starts itself through Bash aren't counted.
Recommendation
bug, needs-triage. Two decisions are needed before an agent can take it:
- Which Run metrics apply to a Process Command. Session signals and total minutes clearly do. Outcome-based fields, such as a pull request outcome, only apply when the Process has a
deliveryStep. - What the header's harness and model mean for a Process whose Steps choose different ones. For example: the Steps' choices, or none at the Command level.
Recording issue and pull_request when the Process has them looks uncontroversial.
Activity
JacobStephens2 commentedon Nov 10, 2026
Investigation summary
Confirmed against selected Base main at d6bee52, thirdshift 0.27.2. An isolated reproduction used the repository's fake GitHub and Harnesses, with Command defaults codex/gpt-6.1-sol/high and explicit Step choices claude/opus/medium. Both a skill-only Process and an Issue-branch Process with Delivery retained null run_metrics, issue and pull_request. Delivery successfully created an open, non-draft pull request. The Command header and status retained Codex defaults while the Session's .models.json correctly recorded Claude/opus/medium and the fixture's observed Model.
The diagnosis needs two additions:
Issue attribution is structurally absent: Work::Process carries only repository/name and issue_url returns None (src/logs.rs:640). The issue-branch path and Delivery preserve PR resolutions for notification but do not persist the corresponding issue/PR identity in the Command record. Header setup comes from the Command Choice (src/logs/command_record.rs:437; src/logs/recording.rs:261), while Steps legitimately override it under the glossary's inheritance rules.
Next steps: settle metrics applicability, Process versus Delivery outcomes, and Command-default versus actual-session presentation. Then implement recording through a shared completion path, persist known issue/PR identity, include Process skill sessions in weekly aggregation, and add fake-based regressions covering session-only, Delivery, mixed-Harness, failure/interruption and retained-metrics reads after trace removal. Keep #1651's Codex capture and #1639's child-CLI capture separate; this issue concerns recording and projecting evidence already collected.
Questionnaire
For the Day shift: #1655 reproduces on the current Base. Saved Custom process records omit metrics and issue/PR identity, and their headers present Command defaults as the session setup. Detail readers recover some measurements, but weekly trends omit Process skill-session tokens. These decisions remain before implementation: