Skip to content

[deep-report] Right-size Schema Consistency Checker: add chunking or deterministic pre-steps to cut 8.1M-token/138-turn runs #28750

@github-actions

Description

@github-actions

Description

The Schema Consistency Checker consumed 8.1M tokens in a single run across 138 turns (Apr 20–27 weekly window) — the highest per-run token cost in the entire repository. Its cache efficiency is only ~14.9%, meaning most context is being re-read rather than cached. This represents a compounding cost as the workflow runs.

Evidence: Weekly Workflow Analysis #28687, Agentic Observability Report #28682 — both flag this as the primary cost optimization target.

Recommended approach:

  1. Add a deterministic pre-step that fetches/diffs schema files and writes results to /tmp/gh-aw/agent/schema-diff.json before the agent starts — eliminates bulk data-gathering turns (~40–60 turns)
  2. Split the workflow into smaller batch jobs (e.g., one per schema area) rather than one monolithic run
  3. Add max-turns: 60 cap to prevent runaway (current 138 turns = no guard)
  4. Increase cache hit rate by structuring prompts to reuse static context

Expected Impact

Target: reduce from 8.1M → ≤ 3M tokens/run. With weekly cadence: ~5M tokens/week reduction.

Suggested Agent

Agentic Optimization Kit

Estimated Effort

Medium (1–4 hours)

Data Source

DeepReport Intelligence Briefing — April 27, 2026 (run §25003521428); Weekly Workflow Analysis #28687; Observability Report #28682

Generated by DeepReport - Intelligence Gathering Agent · ● 473.9K ·

  • expires on Apr 29, 2026, 3:35 PM UTC

Metadata

Metadata

Type

No type
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