# agent_ui: Use the thread title for agent notifications \(\#59377\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e45e42af6e6e7f2c644875c8b78ebbc237ee6e70

Requested commit: e45e42af6e6e7f2c644875c8b78ebbc237ee6e70

Commit: e45e42af6e6e7f2c644875c8b78ebbc237ee6e70

Tree: c168aeb738005205c3950fe75770e30f4d8f8fcb

Author: Edward Compton

Committer: GitHub

## Message

```
agent_ui: Use the thread title for agent notifications (#59377)

The agent-waiting notification heading was hardcoded to the agent id,
showing "claude acp" for external agents. Use the thread's own title,
which external agents now provide via session info updates, and fall
back to the agent id only for threads that aren't titled yet.

# Objective

- External agent notifications were just headed generically I.e. "claude
acp". There was a TODO in the code to use the thread name, so that it's
clear which thread actually produced the notification.

## Solution

- Use the thread name, seems it was inscope in the code already from a
previous change.

## Testing

Tested manually by triggering a notification and seeing the thread name
instead of acp-claude.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior - this code path wasn't
tested and doesn't seem like it needs it, but willing to be corrected.
- [x] Performance impact has been considered and is acceptable

Release Notes:

- agent: Include thread title in notification when Zed is not focused
```

## Parents

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

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