# agent: Mark subagent completions with Subagent intent \(\#52350\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d3ab0d9daf0c54de4c08c1daa53768d1a5da965b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d3ab0d9daf0c54de4c08c1daa53768d1a5da965b

Requested commit: d3ab0d9daf0c54de4c08c1daa53768d1a5da965b

Commit: d3ab0d9daf0c54de4c08c1daa53768d1a5da965b

Tree: 61e34b24a4bdbaa5bce12f039fb3128eec7ef6c8

Author: Ben Brandt

Committer: GitHub

## Message

```
agent: Mark subagent completions with Subagent intent (#52350)

## 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.
```

## Parents

- [2b8e9cc633bf1d277bcf43d7bc1c5a8dab80fd4d](https://git.cafe/gitcafe/zed/commit/2b8e9cc633bf1d277bcf43d7bc1c5a8dab80fd4d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d3ab0d9daf0c54de4c08c1daa53768d1a5da965b?format=markdown)
