build(sandbox): pin state-based ACP silence watchdog + E2E version diagnostic fix - #2898
Merged
Merged
Conversation
Bumps ZED_COMMIT to e36d6f47ee, which replaces the first-event-only silence watchdog with a state-based one, and repairs the E2E agent-version diagnostic. The original watchdog disarmed permanently on the agent's first event, so it caught the production wedge (prompt accepted, zero events) but missed the shape seen in the E2E claude round (correct answer streamed, then no message_completed). Rather than hard-code a second timeout sized to the longest plausible tool call, busy-ness is now read from thread state: a Pending/InProgress/WaitingForConfirmation tool call is exempt for as long as the work genuinely takes, and silence is only judged when nothing is outstanding. Also updates the incident write-up for both fixes.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Collaborator
Author
|
Paired Zed PR: helixml/zed#74 Merge order: Zed #74 first, then this one. |
An unpinned install makes the claude round non-reproducible, but pinning is the wrong fix. Production auto-installs the latest @agentclientprotocol/claude-agent-acp in every desktop container, and tracking latest is essential rather than incidental — the Anthropic API and Claude Code move fast, and keeping up with them is the point of this integration. Pinning CI would make CI test something we do not ship, and would convert a real signal (agent-package regression) into silence. The remedy is attribution plus resilience: log the resolved agent version so a failure can be attributed, and harden Zed against a misbehaving agent rather than assuming a well-behaved one. Notes the practical consequence for flake triage.
Re-pins to 473a1c7cc2 (helixml/zed main, merge of PR #74) rather than the intermediate branch commit the PR was opened with. The merge commit is content-identical to the tree the E2E validated (git diff f5c77cf39a..473a1c7cc2 is empty), so the validation transfers exactly. Carries, on top of the silence watchdog already pinned by #2896: - interrupt cancels are now targeted, so a cancel racing the creation loop can no longer kill a newer turn (root cause of intermittent Phase 17 failures, and of a user pressing stop-then-retype landing in a stuck interaction) - the silence watchdog judges by thread state rather than a tool-duration guess - three E2E observability repairs: broken grep -c counters, a missing turn-lifecycle/cancel-ordering dump, and a round filter that discarded real Helix interaction ids while reporting them as 'wrong agent'
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.
Pins
ZED_COMMIT=e36d6f47ee. Paired Zed PR: (linked below; opened this first per the ordering rule inCLAUDE.md.)Two follow-ups to the wedge work in #2896, both prompted by the E2E claude-round failure seen during that merge.
1. Judge agent silence by thread state, not a tool-duration guess
The watchdog shipped in #2896 disarmed permanently on the agent's first event. That covers the production wedge (prompt accepted, zero events ever) but misses the other shape — streamed some output, then stalled before completing. That shape is real: the E2E claude round produced a correct answer and then never sent
message_completed.The obvious fix, a second longer idle timeout, needs a constant for "the longest plausible tool call". That number is unknowable and wrong the first time someone runs a 40-minute build.
So the watchdog now asks the thread whether anything is actually outstanding:
has_outstanding_work()is true while any tool call isPending/InProgress/WaitingForConfirmation. Busy threads are exempt for exactly as long as the work genuinely takes — no duration constant anywhere — and silence is only judged when nothing is running. Both shapes then fall out of one rule:Because the budget no longer has to cover tool calls, only model think-time between consecutive events, a single modest 120s default is defensible.
2. Fix the E2E agent-version diagnostic
run_e2e.shreported the agent version withnpm view @anthropic-ai/claude-agent-acp— a package that 404s. Zed installs@agentclientprotocol/claude-agent-acp, which today resolves to 0.63.0 — the same version that was wedged in the production container.The wrong scope silently returned
unknown, disabling the one signal that distinguishes "we regressed" from "the agent package changed under us". Now queries the correct scope, warns loudly if it cannot resolve, and states explicitly that the install is unpinned.Validation
cargo check --package zed --features external_websocket_sync— cleancargo test -p external_websocket_sync— 56 passed (new test asserts outstanding tool calls are never judged silent)Still open
The npm install remains unpinned, so the claude round is not reproducible across time. Tracked in
design/2026-07-29-acp-agent-silent-prompt-wedge.md.🤖 Generated with Claude Code