# acp_thread: Add shared structured plan state \(\#64884\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 72d28c32c2ba77a579e1c02f984654518552124b

Requested commit: 72d28c32c2ba77a579e1c02f984654518552124b

Commit: 72d28c32c2ba77a579e1c02f984654518552124b

Tree: 6dfbe610b19e05f620df77247664a767fb473f4d

Author: Ben Brandt

Committer: GitHub

## Message

```
acp_thread: Add shared structured plan state (#64884)

Give structured agent plans one retained source record per identity and
a separate selected plan, while preserving the existing single-panel UI
and v1 behavior.

- Adapt complete v1 snapshots into shared SDK-v2 entry values before
mutating state. Retain entry metadata, plan-content metadata, and outer
update metadata at their respective levels.
- Add a keyed structured-items entrypoint without synthetic protocol
IDs. A new ID or meaningful ordered task change selects/reopens the
plan; identical and metadata-only snapshots do not switch the panel or
undo dismissal.
- Make Clear Plan dismiss presentation without deleting keyed source.
Keep v1's clear/repopulate behavior and restrict next-turn
completed-entry pruning to the legacy record.
- Reuse Markdown entities within each plan. Preserve unknown v2
statuses/priorities; distinguish cancellation from successful
completion.
- Observe ordinary thread notifications so status-only, selection-only,
and empty-plan changes repaint without depending on a Markdown update.

Release Notes:

- acp: Improved agent plan state handling and panel refreshes.
```

## Parents

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

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