Skip to content

[squad-plan] Investigate and fix Avenger model mismatch between frontmatter and executed engine model #50314

Description

@github-actions

Objective

Find and fix why Avenger (.github/workflows/avenger.md) declares model: claude-haiku-4.5 but audited runs execute on claude-opus-4-8.

Issue context

Issue #50312 found the largest cost driver on the Avenger workflow is a model mismatch: frontmatter/intended budget points to Haiku, but agent_usage.json shows Opus 4.8 in all 3 sampled runs (5x more expensive per token). This suggests a compiler/runtime bug in model propagation, alias resolution, or engine argument generation.

Implementation guidance

  • Start in compiler/engine code, likely pkg/workflow and possibly pkg/cli audit/reporting paths.
  • Trace the model value through:
    1. frontmatter model
    2. engine config extraction
    3. activation job outputs / aw_info.json
    4. runtime engine env/args passed to the Claude engine
    5. any alias expansion/fallback behavior
  • Confirm whether the bug is:
    • compile-time model dropped/overwritten
    • alias resolved incorrectly
    • aw_info/audit reporting wrong while runtime is actually correct
    • engine silently defaulting to a higher-tier model
  • Add a targeted regression test for the failing path.

Acceptance criteria

  • Compiling Avenger preserves the configured model through activation outputs and engine invocation.
  • A targeted regression test fails before the fix and passes after.
  • aw_info.json model metadata and actual runtime/usage model data are consistent after the fix.
  • No unrelated engine/model behavior regresses in targeted tests.

Dependency / ordering notes

Do this first — highest-impact cost fix (~70-80% of AIC/run) and other Avenger changes should be validated with this fix in place.

Generated by 🧑‍🤝‍🧑 Squad Plan · auto · 37.1 AIC · ⌖ 2.24 AIC · ⊞ 9.5K ·
Comment /squad-plan to run again

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[cookie]cookieIssue Monster Loves Cookies!

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions