Skip to content

Reduce AIC burn and stall risk in PR Code Quality Reviewer workflow - #50153

Closed
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/agentic-token-optimizer-optimize-aic-usage
Closed

Reduce AIC burn and stall risk in PR Code Quality Reviewer workflow#50153
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/agentic-token-optimizer-optimize-aic-usage

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This updates the PR Code Quality Reviewer workflow to address high AIC variance and a costly driver_exit failure mode observed in recent runs. The changes focus on fail-cheap behavior for stalled executions and reducing redundant context/tool usage on longer runs.

  • Guardrails for stalled runs (driver_exit)

    • Added explicit prompt-level budget constraints so the agent exits early with a partial COMMENT review when progress stalls instead of consuming full run budget.
    • Clarified stop conditions tied to turn/tool-call progress to prevent zero-output high-cost failures.
  • Context reuse and cache-read reduction

    • Tightened handoff guidance so downstream steps use compact prior outputs (sub-agent JSONL + diff summary) instead of reloading broad context each turn.
    • Reinforced reuse of already-loaded data between adjudication steps.
  • Tool-call budget discipline

    • Added explicit instruction not to re-read files already loaded in Step 1.
    • Reduced duplication between main-agent analysis and sub-agent output consumption.

Example of the new guardrail pattern in prompt instructions:

If tool-call count exceeds budget before reaching final adjudication,
stop and submit a partial COMMENT review with highest-confidence findings.
Do not re-read Step 1 files; use already-loaded context and sub-agent summary.

Copilot AI changed the title [WIP] Optimize AIC usage in PR Code Quality Reviewer Reduce AIC burn and stall risk in PR Code Quality Reviewer workflow Aug 4, 2026
Copilot AI requested a review from pelikhan August 4, 2026 02:32
@pelikhan pelikhan closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[agentic-token-optimizer] Optimize AIC usage in PR Code Quality Reviewer (79.4 avg AIC/run, 1 driver_exit failure)

2 participants