Repository navigation
Description
Q Workflow Optimization Report
Issues Found (from live data)
Go Logger Enhancement (run #25778334111)
- Run Date: 2026-05-13T04:29:21Z
- Duration: 11.6 minutes | Cost: ~$5.81 | Turns: 92
- Engine: Claude (claude-opus-4-7)
- Agentic Assessments (from gh-aw audit):
- 🔴 HIGH
resource_heavy_for_domain:turns=92 tool_types=45 duration=11m36s write_actions=0→ Compare to similar runs and trim unnecessary turns - 🟡 LOW
partially_reducible:agentic_fraction=0.50 turns=92→ ~50% of turns were data-gathering (find,grep) that can move to deterministic pre-steps
- 🔴 HIGH
Changes Made
Go Logger Enhancement (.github/workflows/go-logger.md)
-
Added
max-turns: 50— Changedengine: claude(simple form) to structured form:engine: id: claude max-turns: 50
Prevents runaway sessions like the 92-turn run. 50 turns is generous for 5 files × ~8 turns each + overhead.
-
Added deterministic pre-step — New
Find candidate Go filesstep runsfindandgrepbefore the agent starts, writing results to/tmp/gh-aw/agent/candidate-files.txt. This eliminates ~46 agent turns previously spent on file discovery. -
Updated prompt — Added "Phase 1: Use Pre-Computed File List" section instructing the agent to
cat /tmp/gh-aw/agent/candidate-files.txtinstead of runningfind/grepcommands itself. Also updated "Task Steps § 1" accordingly.
Expected Improvements
| Metric | Before | Expected After |
|---|---|---|
| Turns | 92 | ~30–40 |
| Cost | ~$5.81 | ~$2–3 |
| Duration | 11.6m | ~5–7m |
Validation
All modified workflows compiled successfully using the compile tool from gh-aw MCP server:
- ✅
go-logger— no errors, no warnings
Note: .lock.yml files will be regenerated automatically after merge.
References
- Run investigated: #25778334111
- Triggered by:
/q optimizecomment on [code-simplifier] refactor(reactions): extract parseBoolReactionField helper #31856 by@pelikhan
- expires on May 15, 2026, 4:54 AM UTC
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download bundle artifact
The bundle file is available in the agent artifact in the workflow run linked above.
To create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 25778857959 -n agent -D /tmp/agent-25778857959
# Fetch the bundle into a local branch
git fetch /tmp/agent-25778857959/aw-q-go-logger-max-turns.bundle refs/heads/q/go-logger-max-turns:refs/heads/q/go-logger-max-turns-9aebfb81ed8f0280
git checkout q/go-logger-max-turns-9aebfb81ed8f0280
# Push the branch to origin
git push origin q/go-logger-max-turns-9aebfb81ed8f0280
# Create the pull request
gh pr create --title '[q] perf(go-logger): cap turns at 50 and pre-compute candidate file list' --base main --head q/go-logger-max-turns-9aebfb81ed8f0280 --repo github/gh-aw
Activity