Skip to content

performance:goal: frame targets at the event level when work runs in parallel #4439

Closed

Description

@kyle-sexton

Problem

Claude Code runs all hooks for an event in parallel, so the user waits for the slowest one, not the sum (hooks docs; total_duration_ms is wall-clock). Per-hook targets hid this: whether the codex Stop hook mattered depended on its excess over the next-slowest Stop hook, not on its own 186-379 ms.

Proposal

When the subject is one of several parallel units (hooks on one event, parallel jobs), goal records the event-level metric alongside the unit's: the event's wall time, the unit's marginal cost (its excess over the next-slowest unit), and the event-level target. Summed CPU stays a separate, secondary figure.

Found during the Windows hook-latency work under #4373 (#4389/#4408, #4415/#4421, #4416/#4422).

Activity

  1. added
    needs-triage
    on Sep 24, 2026
  2. kyle-sexton commented on Sep 29, 2026

    @kyle-sexton
    MemberAuthor

    Issue stays closed. This comes from the 2026-09-29 audit of the unattended Cursor run (report: .work/audit/REPORT.md).

    What the audit found. The event-level fields added by #4887 were never consumed by snapshot or verify, and total_duration_ms had no verification record. Evidence: .work/audit/units/4441/pr-4887.diff.

    What happens next. Draft PR #5283 wires the Event, Unit and Scaling fields into snapshot and verify and records total_duration_ms with its verification record. Refs #4439. The PR is not merged.

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

    needs-triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions