Problem Description
The audit tool returns engine_config: null, metrics.token_usage: null, and metrics.turns: null for certain workflow runs, even when agent_usage.json (which contains token counts) is available. This makes it impossible to understand what engine was used, how many tokens were consumed, or how many turns occurred.
Affected Runs
Confirmed affected: runs 24613802341, 24639023957, 24586650969 — all "Agentic Workflow Audit Agent" workflow runs.
Root Cause
The audit tool relies on aw_info.json to populate engine_config and structured token/turn metrics. When aw_info.json is missing, no fallback to agent_usage.json is attempted.
The agent_usage.json is present for these runs and contains usable token data:
{"input_tokens":5944,"output_tokens":8698,"cache_read_tokens":1170605,"cache_write_tokens":86049,"effective_tokens":243846}
But the audit output shows:
{
"engine_config": null,
"metrics": {
"token_usage": null,
"turns": null,
"effective_tokens": 243845,
"action_minutes": 6,
"error_count": 0
}
}
Note that effective_tokens (243845) is correctly populated from agent_usage.json, but token_usage and turns are null. The engine_config is entirely null.
Steps to Reproduce
# Audit a run that is missing aw_info.json
agenticworkflows audit --run_id_or_url 24613802341
Expected: engine_config populated from available artifacts, token_usage populated from agent_usage.json.
Actual: engine_config: null, token_usage: null, turns: null.
Also confirmed via logs command: filtering by --workflow_name audit-workflows returns runs with engine_id: None, token_usage: None, and turns: None.
Expected Behavior
When aw_info.json is absent, the audit tool should:
- Fall back to
agent_usage.json to populate metrics.token_usage (sum of input+output tokens)
- Fall back to parsing
agent-stdio.log or other available artifacts for turns
- Either report
engine_config: null explicitly with a note, or attempt to infer engine from mcp-logs/agenticworkflows.log
Actual Behavior
engine_config: null, token_usage: null, turns: null — despite agent_usage.json being present with full token data.
Environment
- Repository: github/gh-aw
- Run ID: 24705633805 (this test run)
- Date: 2026-04-21
- gh-aw version: 1.0.21
Impact
- Severity: Medium
- Frequency: Affects all runs where
aw_info.json is not generated (older workflow versions)
- Workaround: Read
agent_usage.json directly from the downloaded logs path
Logs/Diagnostics
Confirmed via ls /tmp/gh-aw/aw-mcp/logs/run-24613802341/:
agent-stdio.log agent_output.json agent_usage.json github_rate_limits.jsonl
mcp-logs/ prompt.txt run_summary.json workflow-logs/
aw_info.json is absent. agent_usage.json contains token counts.
Generated by Daily CLI Tools Exploratory Tester · ● 2.1M · ◷
Problem Description
The
audittool returnsengine_config: null,metrics.token_usage: null, andmetrics.turns: nullfor certain workflow runs, even whenagent_usage.json(which contains token counts) is available. This makes it impossible to understand what engine was used, how many tokens were consumed, or how many turns occurred.Affected Runs
Confirmed affected: runs
24613802341,24639023957,24586650969— all "Agentic Workflow Audit Agent" workflow runs.Root Cause
The
audittool relies onaw_info.jsonto populateengine_configand structured token/turn metrics. Whenaw_info.jsonis missing, no fallback toagent_usage.jsonis attempted.The
agent_usage.jsonis present for these runs and contains usable token data:{"input_tokens":5944,"output_tokens":8698,"cache_read_tokens":1170605,"cache_write_tokens":86049,"effective_tokens":243846}But the audit output shows:
{ "engine_config": null, "metrics": { "token_usage": null, "turns": null, "effective_tokens": 243845, "action_minutes": 6, "error_count": 0 } }Note that
effective_tokens(243845) is correctly populated fromagent_usage.json, buttoken_usageandturnsare null. Theengine_configis entirely null.Steps to Reproduce
# Audit a run that is missing aw_info.json agenticworkflows audit --run_id_or_url 24613802341Expected:
engine_configpopulated from available artifacts,token_usagepopulated fromagent_usage.json.Actual:
engine_config: null,token_usage: null,turns: null.Also confirmed via
logscommand: filtering by--workflow_name audit-workflowsreturns runs withengine_id: None,token_usage: None, andturns: None.Expected Behavior
When
aw_info.jsonis absent, theaudittool should:agent_usage.jsonto populatemetrics.token_usage(sum of input+output tokens)agent-stdio.logor other available artifacts forturnsengine_config: nullexplicitly with a note, or attempt to infer engine from mcp-logs/agenticworkflows.logActual Behavior
engine_config: null,token_usage: null,turns: null— despiteagent_usage.jsonbeing present with full token data.Environment
Impact
aw_info.jsonis not generated (older workflow versions)agent_usage.jsondirectly from the downloaded logs pathLogs/Diagnostics
Confirmed via
ls /tmp/gh-aw/aw-mcp/logs/run-24613802341/:aw_info.jsonis absent.agent_usage.jsoncontains token counts.