# acp_thread: Emit elicitation completion from state transitions \(\#64609\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 05958c4773e84c3d671d823ce44ea0290a3f71f7

Requested commit: 05958c4773e84c3d671d823ce44ea0290a3f71f7

Commit: 05958c4773e84c3d671d823ce44ea0290a3f71f7

Tree: e63f303eee565bf022e18b6a6f5cf727a0c105f1

Author: Ben Brandt

Committer: GitHub

## Message

```
acp_thread: Emit elicitation completion from state transitions (#64609)

Emit elicitation completion from the authoritative state transition
rather than from the task awaiting its response.

ACP request cancellation can drop the response task before canceling the
stored elicitation. Previously, the request became canceled but never
emitted `ElicitationResponded`. A regression reproduces the consequence:
idle-sleep prevention stays disabled even though the request is no
longer pending and the agent is still generating.

- Make response tasks receiver-only; emit completion from the owning
session thread or connection store.
- Distinguish resolving a pending request from canceling an
already-accepted URL flow, which must not emit a second response.
- Preserve existing response payloads, update-before-completion event
order, and duplicate/no-op behavior.

Release Notes:

- N/A
```

## Parents

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

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