# Emit agent thread status change events \(\#60057\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c3a4bda331831aa5bcde791bb49137ef8bd1d77f

Requested commit: c3a4bda331831aa5bcde791bb49137ef8bd1d77f

Commit: c3a4bda331831aa5bcde791bb49137ef8bd1d77f

Tree: b3560c8043fbaa42c7e43af5510ab287f825aec7

Author: David Scarpetti

Committer: GitHub

## Message

```
Emit agent thread status change events (#60057)

# Objective

Fix unreliable working/status indicators for ACP agent threads.

ACP threads update their internal running state when a turn starts,
completes, or is canceled, but those status-only changes were not being
emitted as thread events. The agent UI could miss transitions unless
another entry-related event happened nearby, making it particularly hard
to monitor the status of multiple agent threads running at once.

Hope this helps, and thanks for making Zed.

## Solution

- Add an `AcpThreadEvent::StatusChanged` event.
- Emit it when `running_turn` is set, cleared, or canceled.
- Have `ConversationView` handle the event by syncing the active thread
view's generating indicator.
- Treat status changes as UI state only, not root thread metadata
changes.

## Testing

- `cargo check -p sidebar -p project -p git_ui -p workspace`
- Manually verified in a local dev build on macOS that ACP agent
status/working indicators update reliably.

No automated test was added; this changes UI synchronization for ACP
thread status events.

## 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
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed unreliable working indicators for ACP agent threads.
```

## Parents

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

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