Repository navigation
Conversation
…jobs token-report.sh only discovered `tend-*` workflows and picked a single token-usage.json per run. This missed `review-reviewers` entirely (75% of token usage) and undercounted matrix workflows by only reading one of N job artifacts. Accept additional workflow prefixes as positional args after HOURS, and aggregate all token-usage.json files per run. Add running-tend skill to document tend's non-standard workflows for usage analysis. Co-Authored-By: Claude <[email protected]>
Combines matrix job aggregation (sum all token-usage.json files per run) with cost_usd field from the usage-cost branch. Co-Authored-By: Claude <[email protected]>
Keeps both the extra-prefix shift/args handling and the BSD date fallback. Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
Apr 11, 2026
Most tend-notifications runs were spending $2-6 in Claude turns investigating notifications that dedicated workflows already handled. Three layered fixes: 1. action.yaml post-step marks the event's notification thread as read on success, scoped by updated_at <= run_started_at to avoid clobbering newer activity. Handles issue_comment's PR-vs-issue distinction via .issue.pull_request.url. 2. tend-notifications pre-check (workflows.py) sweeps notifications shadowed by recent dedicated workflow runs in bash before invoking Claude. Catches failed-Claude runs where the post-step's success guard skipped marking. 3. notifications skill Step 4a collapsed to a single comment+review check; removed the workflow-runs investigation now handled by the pre-check. Fine-grained PAT scope updated to notifications:write. Co-Authored-By: Claude <[email protected]>
Previous commit shipped the workflows.py changes but the on-disk YAML hadn't been refreshed (uvx cached an older build). actionlint flagged SC2015 on the stale [-n A] && B || true pattern that the source had already replaced with || continue. Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
Apr 11, 2026
max-sixty
added a commit
that referenced
this pull request
Apr 14, 2026
Bumps generator version to 0.0.12 and syncs lockfile. 50 commits since 0.0.11: notifications cost cut + freshness gate (#251, #254), token-report per-run table and cost estimate (#249, #250), review-reviewers outcome-focused Haiku analysis (#255), config workflow_extra/jobs pass-through (#227), canonical author_association tiers across skills (#261, #263), action token aggregation fix (#266), plus numerous review/mention/ci-runner fixes. Co-Authored-By: Claude <[email protected]>
Merged
max-sixty
added a commit
that referenced
this pull request
Apr 14, 2026
Bumps generator version to 0.0.12 and syncs lockfile. 50 commits since 0.0.11. Highlights: - feat: notifications cost cut + freshness gate (#251, #254) - feat: token-report per-run table + cost estimate (#249, #250) - feat: review-reviewers outcome-focused Haiku analysis (#255) - feat: config `workflow_extra` / `jobs` pass-through (#227) - skills: canonical `author_association` tiers (#261, #263) - fix: action token aggregation (#266), plus numerous review/mention/ci-runner fixes > _This was written by Claude Code on behalf of Maximilian_ Co-authored-by: Claude <[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.
This branch bundles two cost-related changes that built on each other.
1. token-report.sh fixes
list-recent-runs.shalready usestoken-usage.jsonfiles per run instead of picking the first one — fixes undercounting for matrix workflows likereview-reviewers(3 jobs per run).claude/skills/running-tend/SKILL.mddocumenting tend's non-standard workflows and how to include them in usage analysisBefore this change,
review-reviewerswas invisible to the token report despite being 75% of all token usage on tend.2. Notifications cost cut (3-layer fix)
tend-notificationswas burning ~$50/day on worktrunk because most "unread" notifications were leftovers from events that dedicated workflows already handled. Each notification cost $2-6 in Claude turns to investigate and skip.Layer A (action.yaml) — Post-step marks the event's notification thread as read on success. Scoped by
updated_at <= run_started_atso newer activity stays unread. Handlesissue_comment's PR-vs-issue distinction via.issue.pull_request.url.Layer B (workflows.py pre-check) —
tend-notificationsworkflow's existing pre-check now also sweeps notifications shadowed by recent dedicated workflow runs in bash before invoking Claude. Catches the case where Claude failed mid-run (Layer A's post-step is gated byif: success()).Layer C (notifications skill) — Step 4a collapsed to a single comment+review check. Removed the workflow-runs investigation that Layer B now handles in bash.
Bonus: fine-grained PAT scope updated from
notifications:readtonotifications:write(the post-step needs PATCH access).Combined, this should drop
tend-notificationscost from ~$56/day across both repos to under ~$10/day.