Skip to content

feat: include subagent tokens and costs in task totals - #17

Merged
icesixgod merged 2 commits into
mainfrom
codex/include-subagent-usage
Oct 22, 2026
Merged

icesixgod merged 2 commits into
mainfrom
codex/include-subagent-usage

Conversation

@icesixgod

@icesixgod icesixgod commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Task token and cost totals previously covered only the selected agent, so work delegated to subagents was omitted. Include all recursively related active and archived subagents once per task ID, priced using each agent's recorded model and Fast tier. Keep turn details and events scoped to the selected agent.

Refresh totals when a child log changes, appears, or disappears, even while the parent is idle. Reuse the parent's existing index and cache compact accounting summaries. Report missing or unreadable subagent logs as incomplete totals, preserve explicit read budgets, and show task-wide model request counts in the viewer.

Privacy impact

Descendant discovery uses explicit parent identities and structured subagent activity references. Child logs contribute numeric usage, estimates, and bounded warning counts; transcript content, raw metadata, and paths are not merged into the selected task's response. Source logs and full-detail consent are unchanged. English and Chinese documentation describe the accounting scope.

Validation

  • uv run ruff format --check . and uv run ruff check .
  • uv run mypy and Windows platform type checks
  • Backend regression with coverage: 664 passed, 1 skipped; 92.06% overall coverage; all focused coverage gates passed
  • Complete local Chromium acceptance suite: 154 passed
  • Python 3.14 subagent, page-index, and session tests with resource warnings treated as errors: 145 passed
  • Release validation and packaged MCP stdio smoke test
  • English and Chinese documentation are synchronized
  • No real logs, credentials, base instructions, encrypted reasoning, or unredacted screenshots are included

@icesixgod
icesixgod merged commit 4b99e4d into main Oct 22, 2026
15 checks passed
@icesixgod
icesixgod deleted the codex/include-subagent-usage branch October 22, 2026 06:13
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.

1 participant