Skip to content

feat: expose compiled token data as job outputs or artifact (not just step summary) #24282

Description

@adamhenson

Context

PR #23943 is a great step — the compiler now emits a token usage step that renders
token-usage.jsonl to $GITHUB_STEP_SUMMARY. The data is there and visible to humans.

Gap

The token data isn't accessible to downstream jobs or third-party tools at workflow
runtime. The step summary is write-only from a workflow perspective — no downstream
job can read ${{ needs.agent.outputs.input_tokens }} or download a structured artifact.

Proposal

In the compiled token step, also:

  1. Write to $GITHUB_OUTPUT so the agent job exposes outputs:
    outputs:
      input_tokens: ${{ steps.token_usage.outputs.input_tokens }}
      output_tokens: ${{ steps.token_usage.outputs.output_tokens }}
      cache_read_tokens: ${{ steps.token_usage.outputs.cache_read_tokens }}
      cache_write_tokens: ${{ steps.token_usage.outputs.cache_write_tokens }}

Activity

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions