Token-budget finding: offload-analyst full-audit invocations peak at $3.45 per call #25

Closed
opened 2026-07-30 19:12:08 +03:00 by admin · 2 comments
Owner

Context: Token-budget audit run 2026-07-30 measured the plugin's own inference-arbitrage:offload-analyst agent (audit-execution layer).

Measured cost profile:

  • 8 invocations over 30 days: $13.94 total
  • Bimodal shape: several 2–3 turn stubs vs. several 28–52 turn full-audit runs
  • Full-audit-run cost: $2.73–$3.45 per invocation (peak)
  • Peak context: 127,770–198,066 tokens
  • Cache composition: 92.7% read / 6.6% write / 0.7% output (healthy reuse, not a cache-economics issue)

Root cause: Companion finding to #24 — the script-boundary issue. Manual reshaping of inv.json + scan.json into a candidate table on every run accounts for 40.09% of the plugin's own audited spend. Peak context is inflated by that same reshaping work (28–52 turn / full-audit cost profile is the token-side confirmation of #24's script-composition finding).

Recommendation: See #24 for the fix (propose a script-digest to replace manual reshaping). This issue exists as the cost-side record only — no new fix needed beyond #24's proposal.

Related work: Similar cost / script-boundary pairs filed today on other plugins:

  • kotkan/claude-plugin-cluster#81 (cost) / #83 (script-boundary) — cluster:ci-agent
  • kotkan/claude-plugin-cluster#82 (cost) / #56 (script-boundary) — cluster:gitea-agent

Also see #23 (offload-audit finding, same run).

**Context**: Token-budget audit run 2026-07-30 measured the plugin's own `inference-arbitrage:offload-analyst` agent (audit-execution layer). **Measured cost profile**: - 8 invocations over 30 days: $13.94 total - Bimodal shape: several 2–3 turn stubs vs. several 28–52 turn full-audit runs - Full-audit-run cost: $2.73–$3.45 per invocation (peak) - Peak context: 127,770–198,066 tokens - Cache composition: 92.7% read / 6.6% write / 0.7% output (healthy reuse, not a cache-economics issue) **Root cause**: Companion finding to **#24** — the script-boundary issue. Manual reshaping of `inv.json` + `scan.json` into a candidate table on every run accounts for **40.09% of the plugin's own audited spend**. Peak context is inflated by that same reshaping work (28–52 turn / full-audit cost profile is the token-side confirmation of #24's script-composition finding). **Recommendation**: See **#24** for the fix (propose a script-digest to replace manual reshaping). This issue exists as the cost-side record only — no new fix needed beyond #24's proposal. **Related work**: Similar cost / script-boundary pairs filed today on other plugins: - `kotkan/claude-plugin-cluster#81` (cost) / `#83` (script-boundary) — cluster:ci-agent - `kotkan/claude-plugin-cluster#82` (cost) / `#56` (script-boundary) — cluster:gitea-agent Also see **#23** (offload-audit finding, same run).
admin added the costefficiency labels 2026-07-30 19:12:08 +03:00
oleks added the agent-wip label 2026-07-30 19:18:20 +03:00
Owner

Conclude-and-close pass on this issue (companion-to-#24 unit).

Check performed: read kotkan/claude-plugin-inference-arbitrage#24's current body/state and checked open+closed PRs in this repo for any referencing #24.

Evidence:

  • issue_read(owner=kotkan, repo=claude-plugin-inference-arbitrage, index=24, method=get)state: open, labels: ["agent-wip"], 0 comments, no linked PR in the body.
  • issue_read(..., index=24, method=get_comments)[] (no comments, so no sibling-unit PR has been posted against it yet).
  • list_pull_requests(owner=kotkan, repo=claude-plugin-inference-arbitrage, state=all) → 3 PRs total (#22, #19, #18), all merged, none referencing #24 or this cost finding. No PR currently open against #24.

Conclusion: This issue (#25) is confirmed to be a cost-measurement companion record to kotkan/claude-plugin-inference-arbitrage#24, as its own body states ("See #24 for the fix... no new fix needed beyond #24's proposal"). There is no independent code change required here — the fix (a candidate_digest script to replace manual inv.json/scan.json reshaping) lives entirely in #24's proposal.

As of this check, kotkan/claude-plugin-inference-arbitrage#24 is open with no PR yet (no sibling unit in this grind pass has implemented/opened a PR against it at time of writing). This issue should stay open until #24 lands a fix; it is closable alongside #24 once that PR merges — closing #25 now, ahead of #24, would be premature since there's nothing to point to as the resolving change.

No fix implemented, no PR opened, no state change made by this comment per the "conclude and close" unit's rules — reporting status only.

Conclude-and-close pass on this issue (companion-to-#24 unit). **Check performed**: read kotkan/claude-plugin-inference-arbitrage#24's current body/state and checked open+closed PRs in this repo for any referencing #24. Evidence: - `issue_read(owner=kotkan, repo=claude-plugin-inference-arbitrage, index=24, method=get)` → `state: open`, `labels: ["agent-wip"]`, 0 comments, no linked PR in the body. - `issue_read(..., index=24, method=get_comments)` → `[]` (no comments, so no sibling-unit PR has been posted against it yet). - `list_pull_requests(owner=kotkan, repo=claude-plugin-inference-arbitrage, state=all)` → 3 PRs total (#22, #19, #18), all merged, none referencing #24 or this cost finding. No PR currently open against #24. **Conclusion**: This issue (#25) is confirmed to be a cost-measurement companion record to kotkan/claude-plugin-inference-arbitrage#24, as its own body states ("See #24 for the fix... no new fix needed beyond #24's proposal"). There is no independent code change required here — the fix (a `candidate_digest` script to replace manual `inv.json`/`scan.json` reshaping) lives entirely in #24's proposal. As of this check, kotkan/claude-plugin-inference-arbitrage#24 is **open with no PR yet** (no sibling unit in this grind pass has implemented/opened a PR against it at time of writing). This issue should stay open until #24 lands a fix; it is closable alongside #24 once that PR merges — closing #25 now, ahead of #24, would be premature since there's nothing to point to as the resolving change. No fix implemented, no PR opened, no state change made by this comment per the "conclude and close" unit's rules — reporting status only.
oleks removed the agent-wip label 2026-07-30 19:31:08 +03:00
Owner

#24 has landed (PR #28, commit 0482278). Closing this companion cost-record alongside it, as planned.

#24 has landed (PR #28, commit 0482278). Closing this companion cost-record alongside it, as planned.
oleks closed this issue 2026-07-30 19:57:49 +03:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kotkan/claude-plugin-inference-arbitrage#25