Skip to content

Emit agent thread status change events - #60057

Merged
benbrandt merged 1 commit into
zed-industries:mainfrom
dscarpetti:fix-agent-status-updates
Jun 29, 2026
Merged

Emit agent thread status change events#60057
benbrandt merged 1 commit into
zed-industries:mainfrom
dscarpetti:fix-agent-status-updates

Conversation

@dscarpetti

Copy link
Copy Markdown
Contributor

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:

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

Release Notes:

  • Fixed unreliable working indicators for ACP agent threads.

@cla-bot

cla-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: David Scarpetti.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jun 29, 2026
@dscarpetti
dscarpetti force-pushed the fix-agent-status-updates branch from 65b2aed to be653b7 Compare June 29, 2026 01:19
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 29, 2026

@NguyenCuong1989 NguyenCuong1989 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pl

@benbrandt benbrandt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@benbrandt
benbrandt enabled auto-merge June 29, 2026 09:15
@benbrandt
benbrandt added this pull request to the merge queue Jun 29, 2026
Merged via the queue into zed-industries:main with commit c3a4bda Jun 29, 2026
45 checks passed
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
# 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.
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 first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants