Skip to content

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

Closed

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

  1. locked and limited conversation to collaborators on Apr 3, 2026
  2. unlocked this conversation on Apr 3, 2026
  3. linked a pull request that will close this issuefeat: bundle token usage as agent artifact #24315on Apr 3, 2026
  4. adamhenson commented on Apr 3, 2026

    @adamhenson
    Author

    😍

  5. locked and limited conversation to collaborators on Apr 3, 2026
  6. unlocked this conversation on Apr 3, 2026
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