Skip to content

Custom process Commands record no Run metrics, and their header shows the default harness #1655

Open

Description

@JacobStephens2

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

Recommendation

bug, needs-triage. Two decisions are needed before an agent can take it:

  1. 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 delivery Step.
  2. 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

  1. added
    bug
    needs-triage
    on Oct 30, 2026
  2. added
    in-progress
    and removed
    needs-triage
    on Nov 10, 2026
  3. JacobStephens2 commented on Nov 10, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    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:

    • src/processes/source.rs:925,1003-1008 starts Work::Process and finishes through logs::complete. src/logs/recording.rs:526 only saves outcome, cause and end time. This bypasses CommandRecord::finish entirely; merely adding Process to its kind filter at src/logs/command_record.rs:373 would not fix this path.
    • Missing persisted metrics do not mean all figures require manual reconstruction today. Both show --json and metrics --json reconstructed elapsed time and the fixture's 8 input/4 output tokens. src/logs/reading.rs:480 reconstructs completed records without saved metrics. However, weekly metrics produced only a Codex-default Process row, with no session row or token totals: src/logs/command_record.rs:284 excludes Process Step from is_session, which src/logs/metrics/trends.rs uses for session aggregation. Historical reconstruction also cannot restore completion-time review counts or saved Usual ranges.

    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:

    1. Should every Custom process persist elapsed time, stage times and available Session signals, including command-only, failed and interrupted Processes? For fields whose Steps never ran, should Repairs/CI rounds be zero or unavailable? This determines the metrics contract.
    2. When Delivery runs, should the Command retain its Process outcome such as succeeded and record the PR goal separately, or use ready-for-review/merged outcomes? Without Delivery, which PR-based metrics should remain unavailable? This prevents Process completion from implying a delivery result.
    3. For the header, status and Console, should the existing Harness/Model/Effort fields remain explicitly labelled Command defaults with actual setups listed per Session, or should a new summary show the distinct executed setups? Specify mixed-Harness and no-session behavior; requested choices must remain separate from observed Models.
    4. Should this become a Spec with three Tickets: (A) persist known issue/branch/PR identity; (B) persist applicable completion metrics and include Process skill sessions in weekly trends; (C) present defaults and actual Session setups consistently? A can proceed independently; B and C need the decisions above. Alternatively, keep one Ticket if the agreed scope fits one session. This resolves the split without publishing incomplete Tickets.
  4. added
    ready-for-human
    and removed
    in-progress
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions