spawn/.github
Ahmed Abushagur 21eb1bf6e0
fix(agent-team): cut token spend — reduce cron frequency + downgrade team-lead to Sonnet (#3310)
Two high-impact, zero-risk changes to get daily agent team spend under $50:

1. Reduce cron frequency:
   - Security: */30 → every 4 hours (48→6 cycles/day, 87% reduction)
   - Refactor: */15 → every 2 hours (96→12 cycles/day, 87% reduction)

   Most cycles find nothing to do (no new PRs/issues). Issue-triggered runs
   (on labeled issues) still fire instantly via the `issues` event type,
   so response time to real work is unchanged. The trigger-server already
   returns 409 when a cycle is in-progress, so high cron frequency was just
   idle-polling cost.

2. Downgrade team-lead model from Opus to Sonnet:
   - Security: --model sonnet for review_all and scan modes (triage was
     already using gemini-3-flash-preview)
   - Refactor: --model sonnet

   The team lead's job is coordination — spawn teammates, monitor them,
   shut down. This is routing, not reasoning. Sonnet handles it fine and
   its output tokens are ~5x cheaper than Opus. Teammates (spawned by the
   lead) use their own model flags and are unaffected.

Combined effect: ~90% fewer cycles × ~80% cheaper per cycle on the team
lead = estimated 95%+ cost reduction on team-lead tokens alone.

Follow-up PR will trim prompt sizes (Phase 2) and consolidate security
teammates (Phase 3) per the plan, but this Phase 1 closes most of the gap.

Co-authored-by: L <6723574+louisgv@users.noreply.github.com>
2026-04-16 00:06:56 -07:00
..
ISSUE_TEMPLATE fix: allow rich text in bug report issue template (#1710) 2026-02-22 10:04:20 -08:00
workflows fix(agent-team): cut token spend — reduce cron frequency + downgrade team-lead to Sonnet (#3310) 2026-04-16 00:06:56 -07:00