Skip to content

Read AWF's new per-conversation budget-notice records #77054

Done

Description

@rabeckett

From the first AWF release after v0.29.11, AWF sends each budget notice to every conversation in a run, once, and adds a notice for when only a few requests' worth of credits, or a few minutes, remain. Its records changed to match.

In token-usage.jsonl, the existing steering: {type, threshold} field keeps its contract: at most once per threshold per run, and only for 80, 90, 95 and
99. A new steering_delivery field is written on every delivery, with:

  • type: ai_credit or timeout;
  • trigger: threshold, or little_left for the new notice;
  • threshold: the percentage, or null for little_left;
  • conversation: an opaque 12-character key that is stable only within the run, or null;
  • first: whether this was the run's first delivery of that notice.

The api-proxy's ai_credit_steering and timeout_steering log events, which gh-aw turns into firewall.steering events, now also carry trigger and conversation, and their threshold is null for little_left.

gh-aw doesn't read any of this yet. unified_session_payload.cjs keeps only type and threshold from steering and drops steering_delivery. Its steeringThreshold decoder in pkg/cli/token_usage_types.go turns a null threshold into 0, so gh aw audit would list a "little left" notice with a threshold of 0. As a result, audits can't show which conversations heard a notice, which is the main thing the AWF change is meant to fix.

What we'd like

  • Carry steering_delivery into the unified session file (usage/aw_session.jsonl) on firewall.token_usage events, and keep trigger and conversation on firewall.steering events. Audit, logs and footers should read these from the session file, not from token-usage.jsonl or the api-proxy log directly.
  • In gh aw audit and gh aw logs --json, list every delivery with its conversation, and show "little left" notices as such instead of a threshold of 0.
  • Keep the routed-steering smoke test's at-most-once check (T2) on the legacy steering records, which AWF still writes once per threshold.
  • Update the smoke workflow's prompt (.github/workflows/smoke-copilot-routed-steering.md). It asks the agent to report "the threshold percentage stated in the warning", but the new notices state amounts instead, for example "247 of 300 AI credits are used". Asking for the amounts the warning states would match.

Runs on AWF v0.29.11 or older have no steering_delivery, so the decoding needs to accept records without it.

Related: github/gh-aw-firewall#11442, github/gh-aw-firewall#11479, github/gh-aw-firewall#11485

Activity

  1. locked and limited conversation to collaborators on Nov 12, 2026
  2. unlocked this conversation on Nov 12, 2026
  3. added
    enhancement
    on Nov 12, 2026
  4. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    Assigned to @lpcox: they own the AWF firewall version bumps (#75436, #77081), the component that emits these budget-notice records.

    Generated by 🔧 Daily Assign Issue To User · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~1 AIC · ⊞ 2.6K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ai-inspectedauditenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions