Skip to content

feat: show root orchestration cost tally for subtasks#11937

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/orchestration-cost-display
Draft

feat: show root orchestration cost tally for subtasks#11937
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/orchestration-cost-display

Conversation

@roomote-v0
Copy link
Contributor

@roomote-v0 roomote-v0 bot commented Mar 16, 2026

Related GitHub Issue

Closes: #11928

Description

This PR attempts to address Issue #11928 by displaying the full orchestration cost (aggregated across all tasks) when viewing a subtask spawned by an orchestrator.

How it works:

  • ChatView: When the current task has a rootTaskId (i.e., it is a subtask), we request aggregated costs for the root task via the existing getTaskWithAggregatedCosts message. The response is stored in the existing aggregatedCostsMap.
  • TaskHeader: A new optional rootOrchestrationCost prop is passed from ChatView. When present and > 0, it renders the orchestration total cost in both the collapsed and expanded views of the task header.
  • i18n: Two new English translation keys added: chat:costs.orchestrationLabel and chat:costs.orchestrationTotal.

No backend changes were needed -- this leverages the existing rootTaskId on HistoryItem and the existing aggregateTaskCostsRecursive infrastructure.

Test Procedure

  • Added 4 new tests to TaskHeader.spec.tsx covering orchestration cost display (present, absent, zero value).
  • All 25 TaskHeader tests pass. All 12 aggregateTaskCosts tests pass.
  • Full lint and type-check pass across the monorepo.

Manual testing steps:

  1. Start an orchestrator task that spawns subtasks.
  2. Navigate to a subtask view.
  3. Verify the orchestration total cost appears next to the task's own cost in both collapsed and expanded header views.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue.
  • Scope: Changes are focused on the linked issue.
  • Self-Review: Performed a thorough self-review.
  • Testing: New tests added to cover changes.
  • Documentation Impact: No documentation updates required.
  • Contribution Guidelines: Read and agree to Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

Feedback and guidance are welcome.

Interactively review PR in Roo Code Cloud

When viewing a subtask spawned by an orchestrator, the TaskHeader now
displays the full orchestration cost (aggregated across all tasks in the
orchestration) alongside the current task cost. This gives users
visibility into total spend without having to navigate back to the
parent task.

Addresses #11928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Show $.$$ API cost tally of Parent task (full orchestration) above $.$$ cost tally of current worker task

1 participant