Skip to content

[cli-tools-test] logs summary always reports total_tokens=0 despite aic being populated #42685

Description

@github-actions

Problem Description

The logs tool summary consistently reports total_tokens: 0 across all queries, even when individual runs have aic (AI Credits) values populated. This creates a confusing inconsistency where cost data (aic) is available but token usage data is always zero.

Command/Tool

  • Tool: logs
  • Command: agenticworkflows logs --start_date "-1d" --count 3 --max_tokens 3000

Steps to Reproduce

  1. Run agenticworkflows logs --start_date "-1d" --count 3 --max_tokens 3000
  2. Inspect the summary field in the returned JSON
  3. Observe total_tokens: 0 even when runs have non-zero aic values

Expected Behavior

total_tokens in the summary should reflect aggregate token usage from runs where that data is available. If token data requires --artifacts agent, the summary should either omit the field or document why it is zero.

Actual Behavior

Summary always shows total_tokens: 0 and total_aic: 445.247 simultaneously — AIC (cost) is populated but the token count that drives it is zero.

Individual run objects also lack a token_usage field entirely, while audit for the same run returns token_usage: 155571 alongside aic: 404.369.

Environment

  • Repository: github/gh-aw
  • Run ID: 28498718802
  • Date: 2026-07-01
  • Tested against: 6 different log queries with various filters (date range, workflow name, engine)

Impact

  • Severity: Medium
  • Frequency: Always (100% reproducible with any logs query)
  • Workaround: Use audit tool per run to get token usage

Logs/Diagnostics

Query output (logs --start_date "-1d" --count 3):

{
  "summary": {
    "total_runs": 3,
    "total_tokens": 0,
    "total_aic": 445.247,
    "total_action_minutes": 39
  },
  "runs": [
    { "run_id": 28497610210, "workflow_name": "Contribution Check", "aic": 404.369 }
  ]
}

audit --run_id 28497610210 for the same run:

{ "metrics": { "token_usage": 155571, "aic": 404.369 } }

Additional Context

aic IS derivable from the usage artifact (cost data is correct), but token_usage is missing from the same artifact. If token counts are in agent logs (requiring --artifacts agent), then total_tokens in the summary should be omitted or labeled as unavailable rather than silently set to 0 — the current behavior misleads users into thinking no tokens were consumed.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by 🧪 Daily Cli Tools Tester · 145.6 AIC · ⌖ 15.1 AIC · ⊞ 9.1K ·

  • expires on Jul 7, 2026, 10:56 PM UTC-08:00

Metadata

Metadata

Type

No type

Fields

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