Skip to content

fix(subagents): drop cost from subagent spend - #887

Merged
tt-a1i merged 1 commit into
mainfrom
fix/subagent-spend-no-cost
Oct 19, 2026
Merged

tt-a1i merged 1 commit into
mainfrom
fix/subagent-spend-no-cost

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Problem

#886 showed a dollar cost next to subagent token spend. The maintainer does not want prices shown, and nothing else uses the cost field.

Value

Subagent surfaces show only token counts, and an unused field is gone.

Approach

  • Remove cost from SubagentSpend, from what the Pi backend copies out of getSessionStats(), and from the formatter.
  • Output is now 21k in (10k cached) · 65 out.
  • Result entries persisted by feat(subagents): show cumulative token spend and cost #886 that still carry spend.cost render unchanged; the extra field is ignored, and a test covers it.

Validation

  • bun run check: passed.
  • bun run test: Node 2,359 passed / 0 failed; Vitest 1,498/1,498.
  • Local Web E2E, session and subagent specs: 11/11.

Impact

  • User-visible: the · $… suffix disappears from subagent surfaces.
  • Model-visible: the subagent_check line loses its cost suffix. Tools are unchanged.
  • Runtime: none.
  • Persisted data: new entries no longer store cost; old entries remain compatible.
  • Risk: minimal.

Generated with Devin

Price is not wanted in the spend display, so remove the field rather
than hide it: SubagentSpend keeps only the four token counters, the Pi
backend stops copying stats.cost, and formatSubagentSpend returns just
"<in> in (<cached> cached) · <out> out". Persisted result entries that
still carry details.spend.cost keep rendering — the extra field is
ignored — and tests now assert no "$" reaches details or
subagent_check text.

Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the area:subagents Subagent delegation, skills, or tests label Oct 19, 2026
@tt-a1i
tt-a1i merged commit 1684162 into main Oct 19, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:subagents Subagent delegation, skills, or tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant