# agent: Clean up thread auto-capturing \(\#28550\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5ebac7e30c5d1130a761222528140addcaef6915

Requested commit: 5ebac7e30c5d1130a761222528140addcaef6915

Commit: 5ebac7e30c5d1130a761222528140addcaef6915

Tree: ddcfb6f9aba541a1416f995ef062aa4117ed45c6

Author: Marshall Bowers

Committer: GitHub

## Message

```
agent: Clean up thread auto-capturing (#28550)

This PR cleans up the thread auto-capturing added in #28271.

- Removed usage of `unsafe`
- Fixed feature flag check
- We were incorrectly not respecting the feature flag in release builds
- Made sure the telemetry event was being run on the background executor

Release Notes:

- N/A
```

## Parents

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

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