You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daily XKCD Comic — selected as the highest-AIC non-excluded workflow (1,329 total AIC / 221.5 avg AIC per run over 7 days). All other top workflows were optimized within the last 14 days; this workflow was most recently analyzed on 2026-06-18 from only 2 runs and now has 6 full runs for deeper analysis.
Run #2 (§27753927403) is a severe outlier: 890 AIC, 62 turns, 2.56 M input tokens against a normal baseline of 63–109 AIC, 7–11 turns. Removing it drops the average from 221.5 to 87.8 AIC/run.
Evidence: Run #2 accumulated 62 turns and 890 AIC because the agent invoked search_code and search_repositories (GitHub MCP tools) to try to look up XKCD alt text in code repositories — a completely unnecessary detour. Every search hit GitHub's 429 rate-limit, triggering repeated retries that ballooned context to 2.56 M tokens over 62 rounds.
The workflow's tools: block only declares web-fetch and bash, but the GitHub MCP toolset is available in the runtime and was used without constraint. Normal runs (5 of 6) use only web_fetch (xkcd.com/redacted) and emit a single create_discussion` call.
Action: Add one explicit sentence to the Instructions section:
Use only web_fetch and bash to retrieve comic data — the XKCD API at (xkcd.com/redacted) provides the complete title, img, and alt` fields needed for both relevance checking and the discussion body. Do not use GitHub search or repository tools.
Expected savings: Eliminates outlier runs. At 1-in-6 observed frequency: ~133 AIC/run on average, plus avoids ~14 minutes of wasted action time per incident.
2. Extend the setup step to pre-select and pre-fetch the comic — ~25–40 AIC/run
Evidence: Normal runs take 7–11 turns to complete a task that is structurally 3 steps: (a) read latest comic number, (b) select a comic, (c) fetch its JSON. Steps (a) and (b) are deterministic arithmetic that the agent re-derives at runtime by calling bash date +%j, bash expr, and web_fetch — each adding an LLM round trip.
The existing setup step already runs a curl to get the latest comic number. It can cheaply extend to:
Compute DOY=$(date +%j) and list-index arithmetic in bash.
curl the pre-selected comic JSON to /tmp/gh-aw/agent/xkcd/selected.json.
curl the latest comic JSON as well (already partially done).
The agent then has both JSONs ready to read — the only work remaining is relevance confirmation and discussion formatting (~3–4 turns).
Action: Replace the current setup steps.run block with:
Then update the Context section of the prompt to reference /tmp/gh-aw/agent/xkcd/selected.json and /tmp/gh-aw/agent/xkcd/latest.json as already-fetched data.
Expected savings: Removes ~3–5 agent turns (bash + web_fetch calls for selection/fetching) per normal run. At ~9 AIC per turn eliminated: ~27–45 AIC/run.
3. Remove the open-ended retry loop — ~10–15 AIC/run
Evidence: The prompt currently says "If the chosen comic feels irrelevant, pick the next number from the list and try again (max 3 attempts)." Every attempt requires one web_fetch call and 1–2 LLM turns. All 51 comics in the curated list are hand-picked for relevance (developer, math, ML/AI), making the relevance check almost always a pass. Runs #4 and #5 had 9 and 11 turns respectively — slightly above normal — likely due to partial retry cycles.
Action: Replace the retry instruction with:
All comics in the curated list are pre-vetted for developer/ML/math relevance. Use the pre-selected comic (/tmp/gh-aw/agent/xkcd/selected.json) directly. Only substitute the latest comic (from latest.json) when it is obviously more relevant and fresh.
This change also reinforces Recommendation 2 by eliminating the loop pattern that tempted the agent to search GitHub for comic metadata.
Expected savings: ~1–2 fewer turns per run on average. ~10–15 AIC/run.
Conservative estimate excludes the outlier frequency since Recommendation 1 fully eliminates it. Normal-run savings (R2 + R3) account for ~40–55 AIC/run improvement against a 87.8 AIC/run baseline — roughly 45–65% reduction.
Target Workflow
Daily XKCD Comic — selected as the highest-AIC non-excluded workflow (1,329 total AIC / 221.5 avg AIC per run over 7 days). All other top workflows were optimized within the last 14 days; this workflow was most recently analyzed on 2026-06-18 from only 2 runs and now has 6 full runs for deeper analysis.
Analysis Period & Runs
workflow_dispatch(run Add CI workflow to compile agentic workflows via gh-aw-actions #1), 5×scheduleSpend Profile
Ranked Recommendations
1. Prevent GitHub-search tool misuse (outlier root cause) — ~135 AIC/run avg, 800 AIC when triggered
Evidence: Run #2 accumulated 62 turns and 890 AIC because the agent invoked
search_codeandsearch_repositories(GitHub MCP tools) to try to look up XKCD alt text in code repositories — a completely unnecessary detour. Every search hit GitHub's 429 rate-limit, triggering repeated retries that ballooned context to 2.56 M tokens over 62 rounds.The workflow's
tools:block only declaresweb-fetchandbash, but the GitHub MCP toolset is available in the runtime and was used without constraint. Normal runs (5 of 6) use onlyweb_fetch (xkcd.com/redacted) and emit a singlecreate_discussion` call.Action: Add one explicit sentence to the Instructions section:
Expected savings: Eliminates outlier runs. At 1-in-6 observed frequency: ~133 AIC/run on average, plus avoids ~14 minutes of wasted action time per incident.
2. Extend the setup step to pre-select and pre-fetch the comic — ~25–40 AIC/run
Evidence: Normal runs take 7–11 turns to complete a task that is structurally 3 steps: (a) read latest comic number, (b) select a comic, (c) fetch its JSON. Steps (a) and (b) are deterministic arithmetic that the agent re-derives at runtime by calling
bash date +%j,bash expr, andweb_fetch— each adding an LLM round trip.The existing setup step already runs a curl to get the latest comic number. It can cheaply extend to:
DOY=$(date +%j)and list-index arithmetic in bash.curlthe pre-selected comic JSON to/tmp/gh-aw/agent/xkcd/selected.json.curlthe latest comic JSON as well (already partially done).The agent then has both JSONs ready to read — the only work remaining is relevance confirmation and discussion formatting (~3–4 turns).
Action: Replace the current setup
steps.runblock with:Then update the Context section of the prompt to reference
/tmp/gh-aw/agent/xkcd/selected.jsonand/tmp/gh-aw/agent/xkcd/latest.jsonas already-fetched data.Expected savings: Removes ~3–5 agent turns (bash + web_fetch calls for selection/fetching) per normal run. At ~9 AIC per turn eliminated: ~27–45 AIC/run.
3. Remove the open-ended retry loop — ~10–15 AIC/run
Evidence: The prompt currently says "If the chosen comic feels irrelevant, pick the next number from the list and try again (max 3 attempts)." Every attempt requires one
web_fetchcall and 1–2 LLM turns. All 51 comics in the curated list are hand-picked for relevance (developer, math, ML/AI), making the relevance check almost always a pass. Runs #4 and #5 had 9 and 11 turns respectively — slightly above normal — likely due to partial retry cycles.Action: Replace the retry instruction with:
This change also reinforces Recommendation 2 by eliminating the loop pattern that tempted the agent to search GitHub for comic metadata.
Expected savings: ~1–2 fewer turns per run on average. ~10–15 AIC/run.
Tool Usage Assessment
web_fetchbash(curl, jq, date, expr)safeoutputs/create_discussiongithub/search_codegithub/search_repositoriesSummary of Expected Savings
Caveats
curlandjqremain available in the runner environment (currently configured intools.bash).Run-level details
References: §27753927403 (outlier), §27948330583 (most recent)