Log date · Mon
How should GH-AW attribute tokens when detection is skipped?
Published on · Updated
Skipped detection should not inherit parent tokens. Three local cases compare fallback accounting with stage ownership.
The answer: attribute usage to its stage
A skipped GH-AW detection stage should not inherit its parent’s tokens. We compared two attribution rules in three owned cases: each has 1,200 parent tokens. A naive fallback assigns 1,200 to detection both when skipped and when its counter is missing; stage ownership yields omitted and unknown respectively. When the detector has 180 tokens, both rules use 180.
Usage and detection outcome answer different questions: an absent field is not a pass, and a number is not proof that a scan ran. GitHub listed the fix separately in its October 26, 2026 weekly update. [1]
| Case | Fallback | Stage ownership |
|---|---|---|
| Skipped | 1,200 | Omitted |
| Completed with detector counter | 180 | 180 |
| Completed, detector counter missing | 1,200 | Unknown |
The event and release timeline
The update highlights PR #71933. GitHub records its merge at 20:52:01 UTC on October 25, 2026, or 04:52:01 on October 26 in Beijing, at merge commit a81e497. Version v0.93.5 was published earlier, at 17:17:17 UTC on October 25, or 01:17:17 on October 26 in Beijing. [1][2][5] We have not established which later release contains the fix; the weekly update alone does not establish that v0.93.5 includes it.
The PR explains that a downloaded agent artifact could carry old counters. The fix moves cleanup after download into an always() step and makes detection telemetry read detection_usage.json. A skipped detection omits gen_ai.usage.*, and detection no longer falls back to parent-agent logs. [2][3] Upstream regression tests cover inherited file and log counters and independent detector counters. [4] This concerns reporting attribution; it does not establish a bypass, an application vulnerability or a corrected bill.
Three cases: illustrating attribution with Node.js
We ran a small program of our own with Node.js 20.19.5. It compares “use the parent when the detector counter is absent” with a rule based on state and ownership. This is an illustration of the attribution problem, not an experiment we performed on a GH-AW release; we did not install GH-AW or validate customer workflows.
const naive = c.detector ?? c.parent;
const owned = c.state === 'skipped' ? 'omitted' : (c.detector ?? 'unknown');skipped | parent=1200 | naive=1200 | owned=omitted
complete | parent=1200 | naive=180 | owned=180
missing | parent=1200 | naive=1200 | owned=unknownThe 1,200 and 180 are synthetic counts chosen for visibility, not actual charges. The fallback rule looks only for a number and can relabel an already attributed parent value as a child value; summing stage values can then double count it. Keeping unknown separate from a measured zero prevents a data gap from looking like free execution.
Recommendations for acceptance
These are engineering recommendations, not GH-AW behavior measured by our illustration. Record a run ID, stage, input digest, tool revision, terminal state, reason and counter origin so ownership can be checked before aggregation.
| Case | Recommendation |
|---|---|
| Completed with counter | Attribute detector-owned usage; retain result and coverage. |
| Skipped | Record the reason; do not inherit parent usage or treat it as a pass. |
| Counter missing after execution | Mark unknown and investigate collection; do not fill zero or reuse parent usage. |
| Failed or insufficient coverage | Retain failure and scope; do not summarize it as complete. |
When comparing ordinary and hardened builds, hold the model, analyzer, task and budget constant, and list unexecuted and uncovered work separately. A skipped detector cannot establish improved clone resistance. Correct attribution does not validate functional equivalence or application protection.
Keep the identity of each retry when aggregating. A retry may incur new usage, whereas downloading the same historical artifact again does not create a new model call. Deduplicate by execution instance and source before calculating stage totals. If records are missing, retain an incomplete status instead of presenting a partial total as certain.
Check your own workflow
Pin the compiler and action revisions actually used, regenerate and review the corresponding lock file. GitHub documents aggregated usage in the agent artifact and a span mirror when telemetry is configured; layouts can vary by version. [6] With a non-sensitive input you own, check completed, skipped and missing-detector-counter paths and associate outputs and states with the same run.
# In your own repository, substitute a run ID and inspect downloaded artifacts.
gh aw logs 123456789 --artifacts agent
# Review the generated workflow for the detector guard and cleanup order.
rg -n -C 5 "agent_usage.json|detection_usage.json|detection_guard" .github/workflows/example.lock.ymlCheck that generated cleanup follows download and precedes the detection guard, then verify the counter origin on the conclusion span. Do not turn missing usage into zero cost or a security pass; check the input, detection result and required coverage as well. Configuration and failure handling depend on policy, so validate against the current documentation and the actual lock file. [7] We report no savings percentage, security score or new product capability.
Your checklist
- Check compiler and action revisions and the generated lock file.
- Record detection state, skip reason, coverage and counter origin separately.
- Test completed, skipped and missing-counter paths with owned inputs.
- Check cleanup ordering and avoid attributing parent usage twice.
- Distinguish unknown usage from measured zero and accept based on detection results.
Primary sources
- GitHub Agentic Workflows official weekly update — October 26, 2026 · Source date 2026-10-26 · Checked 2026-11-11
- GH-AW PR #71933: skipped detection and inherited token attribution · Source date 2026-10-25 · Checked 2026-11-11
- GH-AW detection telemetry at reviewed PR revision 1b624773 · Source date 2026-10-25 · Checked 2026-11-11
- GH-AW regression tests at reviewed PR revision 1b624773 · Source date 2026-10-25 · Checked 2026-11-11
- GH-AW v0.93.5 release: published before PR #71933 merged · Source date 2026-10-25 · Checked 2026-11-11
- GitHub Agentic Workflows: Artifacts · Checked 2026-11-11
- GitHub Agentic Workflows: Threat Detection · Checked 2026-11-11