Skip to content

Bound AgentRx optimizer input to avoid prompt exhaustion - #67133

Merged
pelikhan merged 2 commits into
mainfrom
copilot/aw-daily-agentrx-trace-optimizer
Oct 9, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/aw-daily-agentrx-trace-optimizer

Conversation

Copilot AI commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

The Daily AgentRx Trace Optimizer exhausted its prompt and emitted no terminal safe output. Its supplemental log queries and trajectory could include more run data than the analysis needs.

  • Bound log retrieval: Query at most three workflows, with up to 10 runs per workflow from the last 24 hours; do not widen the query on retry.
  • Bound trajectory size: Analyze at most 10 runs total, prioritizing failures and then high-latency runs; omit raw log text.
{
  "count": 10,
  "start_date": "-1d",
  "artifacts": ["agent"]
}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix prompt exhaustion issue in Daily AgentRx Trace Optimizer Bound AgentRx optimizer input to avoid prompt exhaustion Oct 9, 2026
Copilot AI requested a review from pelikhan October 9, 2026 06:17
@pelikhan
pelikhan marked this pull request as ready for review October 9, 2026 07:13
Copilot AI balanced review requested due to automatic review settings October 9, 2026 07:13
@pelikhan
pelikhan merged commit 1d0422b into main Oct 9, 2026
8 checks passed
@pelikhan
pelikhan deleted the copilot/aw-daily-agentrx-trace-optimizer branch October 9, 2026 07:14

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.

🟡 Changes recommended

The sub-agent experiment variant can still generate an unbounded trajectory.

1 open finding
What changed in this PR

Bounds AgentRx log queries and trajectory size to reduce prompt exhaustion.

Changes:

  • Limits supplemental queries to three workflows and 10 recent runs each.
  • Caps trajectories at 10 prioritized runs and excludes raw logs.
  • Updates the generated workflow lock metadata.

The trajectory cap is not propagated to the trajectory-builder sub-agent. No security permissions or access were broadened.

File Description
.github/​workflows/​daily-agentrx-trace-optimizer.md Adds retrieval and trajectory limits.
.github/​workflows/​daily-agentrx-trace-optimizer.lock.yml Updates generated body hashes.

🧠 Review effort: Balanced

Do not invoke `trajectory-builder` in this variant.
{{/if}}

Limit the trajectory to **10 runs total** across all sources. Prioritize failed runs, then the highest-latency runs, and omit raw log text.
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.91.7

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.

[aw] Daily AgentRx Trace Optimizer exhausted its prompt

3 participants