Repository navigation
Conversation
Every tend run now parses session JSONL logs after Claude finishes and writes a token-usage.json (included in session log artifacts) with input, output, cache-creation, and cache-read token counts. The totals are also written to GITHUB_STEP_SUMMARY and exposed as an action output. A new token-report.sh script downloads artifacts from recent runs and produces a JSON report (per-run breakdown + totals) to stdout with a human-readable summary to stderr. The review-runs skill now calls this as part of its daily analysis. Co-Authored-By: Claude <[email protected]>
tend-agent
reviewed
Apr 8, 2026
tend-agent
left a comment
Collaborator
There was a problem hiding this comment.
jq -s (without -c) outputs pretty-printed multi-line JSON, which breaks the GITHUB_OUTPUT format — GitHub Actions only reads the first line after =, so token_usage ends up as { instead of the full object.
jq -s outputs multi-line JSON, but GITHUB_OUTPUT only reads up to the first newline. Pipe through jq -c to compact before writing. Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
Apr 8, 2026
max-sixty
added a commit
that referenced
this pull request
Apr 8, 2026
Bumps generator version to 0.0.8 and syncs lockfile. The tag push triggers the PyPI release workflow. 1 commit since 0.0.7: token usage measurement and reporting (#188). Co-Authored-By: Claude <[email protected]>
Merged
max-sixty
added a commit
that referenced
this pull request
Apr 8, 2026
Bumps generator version to 0.0.8 and syncs lockfile. 1 commit since 0.0.7: token usage measurement and reporting (#188). > _This was written by Claude Code on behalf of maximilian_ Co-authored-by: Claude <[email protected]>
tend-agent
added a commit
that referenced
this pull request
Apr 13, 2026
#249 switched the token-usage jq filter to `select(.type == "result")`, an event type that claude-code-action's session JSONL does not emit. Every `token-usage.json` since the merge has reported zero tokens — confirmed across all 61 runs in the past 24h on this repo. Restore the per-assistant-event aggregation from #188 and compute cost from token totals × Claude Opus 4 list prices, since `total_cost_usd` isn't available in this JSONL format. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every tend run now measures token consumption and writes the result to three places:
token-usage.jsonin the session log artifact — machine-readable, included automatically in the existing artifact uploadGITHUB_STEP_SUMMARY— visible as a table in the Actions UI for every runtoken_usageaction output — available to downstream steps/workflowsA new
token-report.shscript aggregates across runs: downloads artifacts, reads the pre-computed JSON, and outputs a full report (per-run details + totals) to stdout with a human-readable per-workflow summary to stderr. The review-runs skill now calls this as Step 2 of its daily analysis.