Repository navigation
Bound AgentRx optimizer input to avoid prompt exhaustion - #67133
Merged
Merged
Conversation
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
pelikhan
marked this pull request as ready for review
October 9, 2026 07:13
Contributor
There was a problem hiding this comment.
🟡 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. |
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.
{ "count": 10, "start_date": "-1d", "artifacts": ["agent"] }