Skip to content

Document bounded optimization for repetitive work - #47335

Merged
pelikhan merged 1 commit into
mainfrom
copilot/update-optimization-instructions
Jul 22, 2026
Merged

Document bounded optimization for repetitive work#47335
pelikhan merged 1 commit into
mainfrom
copilot/update-optimization-instructions

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Large repetitive workloads can exhaust agent budgets before making durable progress. Optimization guidance should favor manageable subsets that advance fairly across runs.

Changes

  • Bounded execution

    • Cap each run by item count, time, turns, or AI credits.
    • Prefer completing a focused batch over partially addressing the full backlog.
  • Fair work selection

    • Persist cursors or processed-item sets with cache-memory.
    • Fall back to deterministic round-robin heuristics such as path buckets, modulo partitioning, or oldest-first ordering.
  • Progress continuity

    • Keep batches idempotent.
    • Skip completed items and report processed and remaining work.
    • Add bounded-work analysis to timeout and token optimization guidance.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan July 22, 2026 14:44
@pelikhan
pelikhan marked this pull request as ready for review July 22, 2026 15:18
Copilot AI review requested due to automatic review settings July 22, 2026 15:18
@pelikhan
pelikhan merged commit 67ed85a into main Jul 22, 2026
@pelikhan
pelikhan deleted the copilot/update-optimization-instructions branch July 22, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds bounded, fair batch-processing guidance for large repetitive workloads.

Changes:

  • Recommends budget-safe subsets with persistent rotation state.
  • Adds bounded-work checks to timeout and token optimization plans.
Show a summary per file
File Description
.github/aw/token-optimization.md Documents bounded backlog processing and continuity.
.github/aw/optimize-agentic-workflow.md Adds bounded-work analysis to optimization guidance.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Medium


### Bound repetitive work to a manageable subset

Do not require one run to finish an unbounded backlog such as hundreds of lint violations. Set a per-run item, time, turn, or AI-credit budget and stop after a useful subset. Persist a compact cursor or processed-item set in `cache-memory` when stable state is available; otherwise use a deterministic heuristic such as file-path buckets, issue-number modulo, or oldest-first ordering. Rotate buckets round-robin across runs so every item eventually receives attention without repeatedly selecting the easiest items.
2. Are there long-running tool calls that could be replaced with DataOps pre-steps?
3. Is the prompt asking the agent to do too much in one run?
4. Can `max-turns` or `timeout-minutes` be raised, or should the task be split?
4. For a large repetitive backlog, can each run process a manageable subset selected with a cache cursor or deterministic round-robin heuristic?
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.0

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.

3 participants