Skip to content

[q] Update AgentRx logs to download agent artifact #46760

Description

@github-actions

Q Workflow Optimization Report

Triggered by @pelikhan on issue #46740: "/q update the logs logic to specify to download the "agent" artifact"

Issues Found (from live data)

daily-agentrx-trace-optimizer

  • Log Analysis: The workflow calls the logs tool without specifying artifacts: ["agent"], so agent-step telemetry is missing for failed runs.
  • Evidence from issue [agentrx-optimizer] Daily Workflow Optimization - 2026-07-20 #46740: 10/10 failing runs have empty token_usage.jsonl and 0/45 runs have Turns>0 populated. The usage artifact is gated on the conclusion job — when runs fail before conclusion, no artifact is produced by default.
  • Impact: All 10 failing runs are completely un-triageable because no agent-step data is available.
Changes Made

daily-agentrx-trace-optimizer (.github/workflows/daily-agentrx-trace-optimizer.md)

  • Added Step 0: Download agent run data to the Analysis Procedure, explicitly documenting the required artifacts: ["agent"] parameter with count: 45 and start_date: "-7d".
  • Updated the Data and Tooling Requirements section to note that artifacts: ["agent"] must always be specified when calling logs.

Expected Improvements

  • Agent-step telemetry (turn counts, token usage, stdout) will be available for failing runs, making the 22% failure rate diagnosable.
  • AgentRx trajectory IR will have richer data for invariant generation and root-cause classification.
  • The Turns/AvgTimeBetweenTurns fields should populate once the agent artifact is downloaded.

Validation

  • ✅ daily-agentrx-trace-optimizer (compiled successfully, no errors or warnings)

Note: .lock.yml files will be regenerated automatically after merge.

References


Warning

Protected Files — Push Permission Denied

This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.

Protected files

The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.

Create the pull request manually
# Download the patch from the workflow run
gh run download 29725499451 -n agent -D /tmp/agent-29725499451

# Create a new branch
git checkout -b q/agentrx-logs-agent-artifact-3e65b84850d30f7c main

# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-29725499451/aw-q-agentrx-logs-agent-artifact.patch

# Push the branch and create the pull request
git push origin q/agentrx-logs-agent-artifact-3e65b84850d30f7c
gh pr create --title '[q] Update AgentRx logs to download agent artifact' --base main --head q/agentrx-logs-agent-artifact-3e65b84850d30f7c --repo github/gh-aw

🎩 Equipped by Q · 37 AIC · ⌖ 5.16 AIC · ⊞ 7.9K ·
Comment /q to run again

  • expires on Jul 21, 2026, 11:51 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions