Skip to content

fix: propagate subagent costs to parent session#259

Open
Ashwinhegde19 wants to merge 2 commits intoKilo-Org:devfrom
Ashwinhegde19:fix/subagent-cost-propagation
Open

fix: propagate subagent costs to parent session#259
Ashwinhegde19 wants to merge 2 commits intoKilo-Org:devfrom
Ashwinhegde19:fix/subagent-cost-propagation

Conversation

@Ashwinhegde19
Copy link

Summary

  • After a subagent completes, sum all assistant message costs/tokens from the child session
  • Add them to the parent's assistant message
  • Ensures displayed session cost includes all subagent work

Fixes #196

OpenRouter/Kilo Gateway sometimes sends thinking content as text-delta
events instead of reasoning-* events. This detects text starting with
'Thinking:' and converts it to reasoning parts so they get properly
hidden after response completion.

Fixes Kilo-Org#236
After a subagent completes, sum all assistant message costs/tokens from
the child session and add them to the parent's assistant message. This
ensures the displayed session cost includes all subagent work.

Fixes Kilo-Org#196
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.

Cost of session doesn't include cost of subagents

1 participant