Skip to content

agent: Mark subagent completions with Subagent intent#52350

Merged
benbrandt merged 1 commit intomainfrom
subagent-intent
Mar 24, 2026
Merged

agent: Mark subagent completions with Subagent intent#52350
benbrandt merged 1 commit intomainfrom
subagent-intent

Conversation

@benbrandt
Copy link
Copy Markdown
Member

Context

Ensure subagent threads build requests with the Subagent intent instead of UserPrompt. This allows us to properly
attribute this as a tool call for certain providers instead of a user request.

Self-Review Checklist

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • copilot_chat: Fix subagent requests being marked as user requests.

Add a test to ensure subagent threads build requests with the
Subagent intent instead of UserPrompt. This allows us to properly
attribute this as a tool call for certain providers instead of a user
request.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 24, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 24, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team and removed request for a team March 24, 2026 20:59
@benbrandt benbrandt merged commit d3ab0d9 into main Mar 24, 2026
42 checks passed
@benbrandt benbrandt deleted the subagent-intent branch March 24, 2026 22:12
@benbrandt
Copy link
Copy Markdown
Member Author

/cherry-pick preview

github-actions bot pushed a commit that referenced this pull request Mar 24, 2026
## Context

Ensure subagent threads build requests with the Subagent intent instead
of UserPrompt. This allows us to properly
attribute this as a tool call for certain providers instead of a user
request.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- copilot_chat: Fix subagent requests being marked as user requests.
zed-zippy bot added a commit that referenced this pull request Mar 24, 2026
…y-pick to preview) (#52358)

Cherry-pick of #52350 to preview

----
## Context

Ensure subagent threads build requests with the Subagent intent instead
of UserPrompt. This allows us to properly
attribute this as a tool call for certain providers instead of a user
request.

## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX

checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- copilot_chat: Fix subagent requests being marked as user requests.

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
@sbsrnt
Copy link
Copy Markdown

sbsrnt commented Mar 26, 2026

Damn I knew I wasn't tripping when out of nowhere my requests were costing me ~1$ instead of the usual 0.04$-0.08$ the moment sub-agents update rolled out

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

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants