Skip to content

[agentic-token-optimizer] Copilot cloud agent: Remove CI-only validation steps from copilot-setup-steps #92

@github-actions

Description

@github-actions

Target Workflow

Copilot cloud agent — selected as the highest-activity agentic workflow with >14 days since last optimization. Not excluded by name, not excluded by recent optimization window.

Analysis Period

May 11 – June 3, 2026 · 20 runs analyzed (5 with step-level detail)

⚠️ Direct LLM token telemetry is not yet active (all audit snapshots report 0 tokens). Analysis is based on GitHub Actions run timing and step-level evidence from the Actions API.

Token / Timing Profile

Metric Value
Total runs (period) 20
Successful 19 (95%)
Cancelled 1 (5%)
Avg total run duration ~340 s
Avg setup overhead (smoke test + validate) ~10–12 s/run
Avg processing time (LLM work) ~300 s
Setup overhead fraction ~3–4%
Step-level evidence (5 sampled runs)
Run Date Smoke test Validate Processing
§26778504338 Jun 1 7 s 1 s 256 s
§26161318949 May 20 7 s 1 s 575 s
§25907778874 May 15 11 s 1 s 636 s
§25879829018 May 14 7 s 1 s 246 s
§25876555028 May 14 10 s 2 s 333 s

Ranked Recommendations

1 · Conditionalize or remove the "Smoke test published workflows" setup step

Estimated savings: ~8–11 s/run · ~2.5–3.5 action-minutes over 20 runs

Evidence: The step runs gh aw add githubnext/agentic-ops/agentic-token-audit githubnext/agentic-ops/agentic-token-optimizer in a temp dir followed by gh aw compile --validate --no-emit. This downloads two workflow packages from the registry and compiles them on every agent invocation — a CI smoke-test that verifies the published workflow artifacts are valid. It is not needed for the agent to do its work.

Action: Add a condition to skip this step unless triggered by a push to the setup file:

- name: Smoke test published workflows via gh aw add
  if: github.event_name == 'push'
  ...

This makes the step a no-op for all agent invocations (which arrive as workflow_dispatch or internal triggers), running only when .github/workflows/copilot-setup-steps.yml changes.


2 · Conditionalize or remove the "Validate published workflows" setup step

Estimated savings: ~1–2 s/run · ~0.5 action-minutes over 20 runs

Evidence: The step runs gh aw compile --dir workflows --validate --no-emit, validating the local workflows/ directory on every agent invocation. This is another pure CI check — it verifies that the source workflow .md files compile correctly, which is meaningful only after a code change.

Action: Same condition as recommendation 1:

- name: Validate published workflows
  if: github.event_name == 'push'
  ...

3 · Remove or conditionalize the "Upload trial results" setup step

Estimated savings: Negligible time, reduces noise in step logs

Evidence: In all 5 sampled runs the step completes in 0 s and uploads nothing — no trials/ directory is produced during normal agent operations. The step is guarded by if: always() which means it runs on failures too, but normal agent tasks never populate that path.

Action: Either remove the step entirely, or add if: github.event_name == 'push' to limit it to CI runs where trial output might actually be produced.


Combined Impact

Recommendation Saves per run Over 20 runs
Conditionalize smoke test ~9 s ~3 action-min
Conditionalize validate ~1.5 s ~0.5 action-min
Conditionalize upload ~0 s negligible
Total ~10–12 s ~3.5 action-min

Reducing setup overhead by 10–12 seconds means the Copilot agent reaches its first LLM turn faster on every invocation, improving responsiveness for users waiting on coding tasks.


Caveats

  • Token telemetry is not yet active for this repository; recommendations are based on timing evidence only and cannot be expressed in token terms.
  • The smoke test and validate steps may be intentional "always-on" health checks. Confirm with the workflow author before conditionalizing.
  • One cancelled run (§25879330450) is within normal variance; no reliability action needed at this sample size.

Generated by Agentic Workflow Token Usage Optimizer · ● 10.2M ·

  • expires on Jun 10, 2026, 4:03 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions