acp: Update agent-client-protocol SDK to 2.0.0 - #61570
Merged
Merged
Conversation
This isn't ACP v2, but just a new version of the SDK where we had to do some breaking changes + cleanups. Release Notes: - N/A
bennetbo
approved these changes
Jul 24, 2026
mdz-axo
added a commit
to mdz-axo/zed-kask
that referenced
this pull request
Jul 25, 2026
Upstream changes (zed-industries/zed main, 27 commits): - agent: Add agent.compaction_model setting for context compaction (zed-industries#60012) - agent: Show effort selector for anthropic compatible providers (zed-industries#61579) - acp: Update agent-client-protocol SDK to 2.0.0 (zed-industries#61570) - client: Extract proxy handshakes into new proxy_handshake crate (zed-industries#61427) - collab: Fix multiworkspace location out of sync bugs (zed-industries#61598) - editor: Fix sticky header drag cancels autoscroll (zed-industries#53592) - editor: Fix crash when copying and pasting using multiple cursors (zed-industries#61545) - editor: Skip untitled buffers when saving a multi-buffer (zed-industries#61380) - gpui: Fix images not being drawn with rounded corners with ObjectFit::Cover (zed-industries#61383) - gpui: Fix deadlock in performance profiler and reenable it (zed-industries#61584) - git_ui: Prevent Git panel bindings in repository selector (zed-industries#61282) - language_model: Add explicit OpenAI conversation compaction and fix Anthropic compaction (zed-industries#61370) - markdown: Fix squashed Mermaid diagrams in markdown preview (zed-industries#61260) - Opus 5 BYOK Support (zed-industries#61596) - repl: Show add-cell controls in empty notebooks (zed-industries#61329) - search: Escape seeded buffer search query in regex mode (zed-industries#57748) - settings: Fix VS Code import appending duplicate file associations (zed-industries#61355) - settings: Split VSCode and Zed keymap files (zed-industries#61532) - Treat blank spawn_agent session IDs as absent (zed-industries#60893) - worktree: Reload git state when a watcher rescan covers a repository (zed-industries#61541) - Plus 7 more minor fixes. Merge fixes: - crates/agent/src/thread.rs: replay_tool_call used 'message_ix' (undefined) after auto-merge; renamed to 'owning_message_ix' (the parameter name). - Cargo.toml: Removed stale workspace members hkask-wallet and hkask-git-cas (both directories deleted in prior commits but workspace entries remained). - kask/crates/hkask-regulation/src/wallet_manager.rs: Stubbed consume() and settle_rjoules() on WalletBudgetPort — these were API-key encumbrance operations from the deleted hkask-wallet crate; regulation tracks per-agent gas balances, not per-key encumbrances. - kask/crates/hkask-regulation/src/wallet_gas_calibrator.rs: Fixed test to use crate::agent_wallet_store::WalletStore instead of hkask_storage::WalletStore. - kask/crates/hkask-regulation/Cargo.toml: Added tokio macros feature to dev-dependencies for #[tokio::test]. - kask/crates/kask_bridge/Cargo.toml: Added futures dependency (needed by context_injector.rs for futures::executor::block_on). - kask/crates/kask_bridge/src/context_injector.rs: Fixed futures_util::executor to futures::executor (futures-util doesn't include executor module). Release Notes: - N/A
0arm
pushed a commit
to 0arm/zed
that referenced
this pull request
Jul 26, 2026
This isn't ACP v2, but just a new version of the SDK where we had to do some breaking changes + cleanups. Release Notes: - N/A
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
This isn't ACP v2, but just a new version of the SDK where we had to do some breaking changes + cleanups. Release Notes: - N/A
Michael-Obele
pushed a commit
to Michael-Obele/zed
that referenced
this pull request
Aug 15, 2026
…ustries#62259) Some context behind this change: I’ve been meaning to look into this because I kept running into this crash when working on [other](zed-industries#61040) fixes. Everything worked fine in dev builds, right up until you tried to create a new Agent Thread using an ACP adapter. The crash reports in this instance were throwing me off: I was seeing different things each time. So, I had Fable look into this. It did so by binary-searching the minimum thread stack on which a probe replicating Zed’s exact handler chain can dispatch one message. Full methodology, probe source, and raw numbers can be found in [this gist](https://gist.github.com/yeskunall/2ac2b00f51389d9388d607974f6f8a04). The results of the probe are as follows: | SDK | Minimum stack (dev profile) | vs. 512 KiB GCD budget | |---|---|---| | 1.3.0 | 409,600–413,696 B | fit, ~100 KiB headroom | | 2.0.0 | 507,904–512,000 B | entire budget before runtime overhead | The oversized frames are monomorphized into `agent_servers`, not the SDK crate -- a `[profile.dev.package]` opt-level override on `agent-client-protocol` does **not** fix this (see gist), and optimized builds collapse the frames entirely, which is why only dev builds crashed. It found that the real signature is `fault_address == stack_pointer` on a `com.apple.root.default-qos` thread inside the ACP dispatch specialization, which I then had it verify across six local `.ips` reports. It seems in zed-industries#61570, we pushed the dispatch chain past the GCD budget, explained further below: `AcpConnection::stdio` polled the ACP client connection future via `background_spawn`, which on macOS executes runnables on [GCD’s](https://developer.apple.com/documentation/DISPATCH) global-queue workers. Those threads have kernel-fixed, unconfigurable [512 KiB stacks](https://github.com/apple-oss-distributions/libpthread/blob/42d026df5b07825070f60134b980a1ec2552dfee/kern/kern_internal.h#L154). In unoptimized builds, the SDK’s chained-handler dispatch needs **~0.5 MiB of stack per inbound message** (again, see linked gist), so the first message overflows the guard page and takes the process down. Therefore, this 512 KiB constraint is **macOS-only**. Linux doesn’t use GCD -- GPUI [spawns its own `std::thread` workers](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/gpui_linux/src/linux/dispatcher.rs#L39) ([2 MiB Rust default](https://github.com/rust-lang/rust/blob/59807616e1fa2540724bfbac14d7976d7e4a3860/library/std/src/sys/thread/unix.rs#L26)). Windows uses [the OS thread pool](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/gpui_windows/src/dispatcher.rs#L68), which [inherits the executable’s stack reserve](https://github.com/MicrosoftDocs/sdk-api/blob/4502fff176b3b56beddb6a63c9f980377b11ba9b/sdk-api-src/content/threadpoolapiset/nf-threadpoolapiset-setthreadpoolstackinformation.md?plain=1#L58) -- [1 MB linker default](https://github.com/MicrosoftDocs/win32/blob/2eb6588c6703d31599285bbb06563c3d41b57590/desktop-src/ProcThread/thread-stack-size.md?plain=1#L17), but Zed already bumps it to 8 MiB in [crates/zed/build.rs:88](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/zed/build.rs#L88) (see [TODO comment](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/zed/build.rs#L87)). --- Release Notes: - N/A
|
Does this add support of ACP v2 to zed? |
playdohface
pushed a commit
to playdohface/zed
that referenced
this pull request
Aug 29, 2026
This isn't ACP v2, but just a new version of the SDK where we had to do some breaking changes + cleanups. Release Notes: - N/A
playdohface
pushed a commit
to playdohface/zed
that referenced
this pull request
Aug 29, 2026
…ustries#62259) Some context behind this change: I’ve been meaning to look into this because I kept running into this crash when working on [other](zed-industries#61040) fixes. Everything worked fine in dev builds, right up until you tried to create a new Agent Thread using an ACP adapter. The crash reports in this instance were throwing me off: I was seeing different things each time. So, I had Fable look into this. It did so by binary-searching the minimum thread stack on which a probe replicating Zed’s exact handler chain can dispatch one message. Full methodology, probe source, and raw numbers can be found in [this gist](https://gist.github.com/yeskunall/2ac2b00f51389d9388d607974f6f8a04). The results of the probe are as follows: | SDK | Minimum stack (dev profile) | vs. 512 KiB GCD budget | |---|---|---| | 1.3.0 | 409,600–413,696 B | fit, ~100 KiB headroom | | 2.0.0 | 507,904–512,000 B | entire budget before runtime overhead | The oversized frames are monomorphized into `agent_servers`, not the SDK crate -- a `[profile.dev.package]` opt-level override on `agent-client-protocol` does **not** fix this (see gist), and optimized builds collapse the frames entirely, which is why only dev builds crashed. It found that the real signature is `fault_address == stack_pointer` on a `com.apple.root.default-qos` thread inside the ACP dispatch specialization, which I then had it verify across six local `.ips` reports. It seems in zed-industries#61570, we pushed the dispatch chain past the GCD budget, explained further below: `AcpConnection::stdio` polled the ACP client connection future via `background_spawn`, which on macOS executes runnables on [GCD’s](https://developer.apple.com/documentation/DISPATCH) global-queue workers. Those threads have kernel-fixed, unconfigurable [512 KiB stacks](https://github.com/apple-oss-distributions/libpthread/blob/42d026df5b07825070f60134b980a1ec2552dfee/kern/kern_internal.h#L154). In unoptimized builds, the SDK’s chained-handler dispatch needs **~0.5 MiB of stack per inbound message** (again, see linked gist), so the first message overflows the guard page and takes the process down. Therefore, this 512 KiB constraint is **macOS-only**. Linux doesn’t use GCD -- GPUI [spawns its own `std::thread` workers](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/gpui_linux/src/linux/dispatcher.rs#L39) ([2 MiB Rust default](https://github.com/rust-lang/rust/blob/59807616e1fa2540724bfbac14d7976d7e4a3860/library/std/src/sys/thread/unix.rs#L26)). Windows uses [the OS thread pool](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/gpui_windows/src/dispatcher.rs#L68), which [inherits the executable’s stack reserve](https://github.com/MicrosoftDocs/sdk-api/blob/4502fff176b3b56beddb6a63c9f980377b11ba9b/sdk-api-src/content/threadpoolapiset/nf-threadpoolapiset-setthreadpoolstackinformation.md?plain=1#L58) -- [1 MB linker default](https://github.com/MicrosoftDocs/win32/blob/2eb6588c6703d31599285bbb06563c3d41b57590/desktop-src/ProcThread/thread-stack-size.md?plain=1#L17), but Zed already bumps it to 8 MiB in [crates/zed/build.rs:88](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/zed/build.rs#L88) (see [TODO comment](https://github.com/zed-industries/zed/blob/82878540b5410b288a2c92cb9ee5675533e4d807/crates/zed/build.rs#L87)). --- Release Notes: - N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This isn't ACP v2, but just a new version of the SDK where we had to do
some breaking changes + cleanups.
Release Notes: