Skip to content

[ambient-context] Daily Ambient Context Optimizer - 2026-07-16 #46082

Description

@github-actions

Executive Summary

  • Runs sampled: 4 completed runs from the last 24h (Discussion Task Miner, Failure Investigator, Scout, Release)
  • Workflows covered: 4 distinct workflows
  • Median first-request size: 17,922 chars | P95: 20,156 chars
  • Key finding: All 4 sampled first-requests contain a ~1,083-char safeoutputs CLI usage block injected by the runtime system prompt — this is ambient overhead present in every single workflow run. Additionally, two workflows (Release, Discussion Task Miner) carry verbose example JSON bodies and duplicated heading sections that add 1,000–1,500 chars each.

Highest-Leverage Changes

  1. [workflow-md] Trim verbose example JSON in discussion-task-miner.md — the ### Step 5: Create GitHub Issues section (1,191 chars) contains a full illustrative issue JSON body. Replace with a concise inline reference. Impact: high.
  2. [workflow-md] Remove duplicate ### ⚠️ Attribution Candidates Need Review heading in release.md — the heading appears twice, adding ~30 lines of duplicate output template context. Impact: medium.
  3. [workflow-md] Deduplicate ### 🔍 Scout Research Report template in scout.md — the output-format template is defined twice (lines 159 and 200). One copy is sufficient. Impact: medium.
  4. [workflow-md] Trim ## Output Format section in release.md — currently 1,487 chars with repeated tool-call instruction boilerplate; consolidate into a concise summary. Impact: medium.
  5. [workflow-md] Trim ## Data Available section in release.md — 1,127 chars enumerating pre-fetched files; convert to a single-sentence pointer to the directory. Impact: low.

CI-Validation Checklist for Implementing Agents

Any agent implementing workflow-file recommendations must complete every item below before opening a PR:

  • Run make recompile for every modified .github/workflows/*.md file — zero compilation errors required
  • Confirm no target workflow file is reduced by more than 40% of its current character count
  • Run make agent-report-progress before the final commit and confirm it passes
  • Check the blocked_files list in /tmp/gh-aw/ambient-context/closed-pr-targets.json (written by Step 4) — do not re-attempt changes to any file that appears in a closed ambient-context optimization PR from the last 14 days
  • Include a smoke-test result or dry-run output in the PR description for every changed workflow spec
  • Document all generated .lock.yml changes in the PR body
  • Do not submit as a draft PR

Key Metrics

Metric Value
Sampled runs 4
Distinct workflows 4
Median chars 17,922
P95 chars 20,156
Largest sampled request 20,156 chars (Release, run 29527845523)
Merged optimizer PRs (7d) 0
Closed optimizer PRs (7d) 0
Optimizer PR close-rate (7d) n/a (< 3 settled PRs)
Per-Run First-Request Metrics
Run Workflow Chars Lines Headings Dup-Line% AIC Conclusion
29526553706 Discussion Task Miner 19,889 411 43 7.84% 200.6 failure
29526838520 Failure Investigator (6h) 12,335 262 15 1.60% 132.0 success
29527845523 Release 20,156 405 43 9.52% 33.8 success
29528196452 Scout 15,955 325 30 6.44% 82.4 success

Request source: prompt.txt (no API proxy event logs available in local artifact cache).

Repeated Ambient Context Signals
  • Runtime safeoutputs CLI block (~1,083 chars) — appears in all 4 sampled runs as an injected section headed by the # or write to a file: safeoutputs create_pull_request . < /tmp/payload.json comment. This is part of the system prompt and cannot be removed by workflow authors, but its presence confirms the runtime adds ~1 KB overhead per run.
  • High heading density — Release and Discussion Task Miner both have 43 headings in ~20 KB prompts (~1 heading per 465 chars). This inflates the structural overhead without adding task-critical guidance.
  • Duplicate output template in scout.md — the ### 🔍 Scout Research Report section is defined verbatim twice.
  • Duplicate attribution heading in release.md### ⚠️ Attribution Candidates Need Review appears twice in the compiled prompt.
  • Verbose example JSON in discussion-task-miner.md — full illustrative issue body (title, description, labels, priority) adds 1,191 chars in Step 5 but most of this context is derivable from the earlier task description.
Deterministic Analysis Output

Script: /tmp/gh-aw/ambient-context/analyze_requests.py (stdlib only)
Output: /tmp/gh-aw/ambient-context/request-analysis.json

Key metrics per run:

Metric Discussion Task Miner Failure Investigator Release Scout
Chars 19,889 12,335 20,156 15,955
Code fences 14 8 12 10
Dup-line ratio 7.84% 1.60% 9.52% 6.44%
SKILL.md refs 0 0 0 0
Inline agents 0 0 0 0
safe_outputs mentions 10 10 13 10

No inline agent or skill definitions found in compiled prompts — skill loading is not a driver of first-request bloat in this sample. Bloat is primarily structural (repeated templates, verbose examples, duplicate headings).

Recommendations by Category

Workflow Markdown

  1. discussion-task-miner.md — Shorten Step 5 example JSON (category: workflow-md, impact: high, safe immediately)

    • Evidence: ### Step 5: Create GitHub Issues is 1,191 chars, mostly an illustrative JSON body.
    • Fix: Replace full example with a 2–3 line abbreviated reference or a link to the safeoutputs schema.
    • Expected saving: ~700–900 chars per run of this workflow.
  2. release.md — Remove duplicate ### ⚠️ Attribution Candidates Need Review heading (category: workflow-md, impact: medium, safe immediately)

    • Evidence: The heading and its template block appear twice in the compiled prompt (9.52% dup-line ratio).
    • Fix: Keep one canonical instance under ### 4. Write Highlights, remove the duplicate.
    • Expected saving: ~300–400 chars.
  3. release.md — Condense ## Output Format section (category: workflow-md, impact: medium, needs manual review)

    • Evidence: Section is 1,487 chars. Contains the update_release MCP tool call instructions that could be expressed more concisely.
    • Fix: Reduce to essential tool-call signature and a single example call; remove narrative repetition.
    • Expected saving: ~500–700 chars. Note: verify update_release call semantics are preserved.
  4. scout.md — Remove duplicate output template section (category: workflow-md, impact: medium, safe immediately)

    • Evidence: ### 🔍 Scout Research Report appears twice verbatim (lines 159 and 200).
    • Fix: Remove the second occurrence.
    • Expected saving: ~350–450 chars per Scout run.
  5. release.md — Compress ## Data Available to a single pointer (category: workflow-md, impact: low, safe immediately)

    • Evidence: 1,127 chars listing 8 pre-fetched files. The agent discovers these files automatically; the verbose listing adds little.
    • Fix: Replace with one sentence: "Pre-fetched release data is in /tmp/gh-aw/agent/release-data/ — use ls to enumerate files."
    • Expected saving: ~700–900 chars.

Skills

No skill loading found in any sampled run. Skills are not a driver of first-request bloat in the current sample. No recommendations.

Agents

No inline agents found in any sampled compiled prompt. Inline agent definitions are not contributing to bloat. No recommendations.

References

Generated by 🌫️ Daily Ambient Context Optimizer · 88.2 AIC · ⌖ 11.9 AIC · ⊞ 7.7K ·

  • expires on Jul 23, 2026, 12:14 PM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions