Skip to content

build(sandbox): pin Zed upstream catch-up (764 commits) + silent-agent watchdog - #2896

Merged
lukemarsden merged 2 commits into
mainfrom
feat/zed-upstream-catchup-and-silent-agent-watchdog
Jul 29, 2026
Merged

build(sandbox): pin Zed upstream catch-up (764 commits) + silent-agent watchdog#2896
lukemarsden merged 2 commits into
mainfrom
feat/zed-upstream-catchup-and-silent-agent-watchdog

Conversation

@lukemarsden

Copy link
Copy Markdown
Collaborator

Pins ZED_COMMIT to the Zed-side upstream catch-up + silent-agent watchdog, and adds the incident write-up.

Paired Zed PR: (linked below once opened — opening this one first per the ordering rule in CLAUDE.md, so CI can never end up pinned at a stale commit if the Zed PR merges first.)

What's in the pinned Zed commit

1. 764-commit upstream catch-up. The fork had drifted 41 days behind (last fence e45e42af6e, 2026-06-18). It is now level with upstream/main at b9256fa8f0. Merged in four dated rounds rather than one jump, so every conflict is attributable to a bounded upstream window:

Round Range Commits Conflicts
1 e45e42af6e..4b7369481d 254 6
2 4b7369481d..4a3e0af532 212 3
3 4a3e0af532..d23aaeebea 226 1
4 d23aaeebea..b9256fa8f0 72 2

2. A fix for the 2026-07-29 production wedge (spt_01kyq6qd8h4wqq2rfasc4b01e9): claude-agent-acp accepted a session/prompt and went permanently silent — no Stopped, no error, so no message_completed and no chat_response_error. The Helix interaction sat in state=waiting indefinitely with nothing surfaced in either UI. Only a container restart recovered it.

Nothing caught it: the connection.prompt() await is unbounded, and the existing wedge recovery keys on an ede_diagnostic error string that a silent wedge never produces.

The fix is a time-to-first-event watchdog, deliberately not a turn timeout — a blanket timeout false-positives on long tool calls, but "zero events since dispatch" is unambiguous. Once the agent emits anything it disarms for the rest of the turn. On expiry it raises a wedge error that feeds the existing force-close → reload → retry machinery rather than a new mechanism. It lives entirely in the Helix-owned crate, so the upstream diff stays at zero.

Validation

  • cargo check --package zed --features external_websocket_sync — clean
  • cargo test -p acp_thread — 127 passed, 1 ignored (documented Critical Fix fix bug where sdxl finetune is running and base sdxl inference request hangs forever #8 divergence)
  • cargo test -p external_websocket_sync — 55 passed
  • Drift sweep — 28/28 after every round
  • Dockerized E2E on the final tree — PASSED for both agent rounds (17/17 phases each, store validation passed, response-entries isolation clean across 34 interactions in 10 sessions)

Two pre-existing breakages repaired (neither caused by this merge)

Known gaps (documented, not fixed here)

  • The watchdog covers "zero events after dispatch". It does not cover "streamed some output, then stalled before completing" — that shape disarms it. Seen once in the E2E claude round; needs a separate idle-since-last-event budget.
  • threadIsWedged() in session_handlers.go only classifies State == error, so a hung waiting turn is still invisible to it.
  • Zed's e2e-test/run_e2e.sh queries the wrong npm scope for the agent version, so its attribution log line is always unknown.

🤖 Generated with Claude Code

Bumps ZED_COMMIT to d1dffb8116, which brings:

- The 764-commit upstream Zed catch-up (fork was 41 days behind; now level with
  upstream/main at b9256fa8f0). Merged in four dated rounds, 12 conflicts resolved,
  all Helix critical fixes verified intact by a new mechanised drift sweep.
- A watchdog for the 2026-07-29 production wedge, where claude-agent-acp accepted a
  session/prompt and went permanently silent — no Stopped, no error — leaving the
  Helix interaction in state=waiting forever with nothing surfaced in either UI.

Also adds the incident write-up for that wedge.

Zed-side validation: cargo check clean; acp_thread 127 pass / 1 documented ignore;
external_websocket_sync 55 pass; drift sweep 28/28; dockerized E2E green on the
final tree for BOTH agent rounds (17/17 phases each, store validation passed).
@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

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.

@lukemarsden

Copy link
Copy Markdown
Collaborator Author

Paired Zed PR: helixml/zed#73

Merge order (per CLAUDE.md): Zed PR #73 first, then this one.

@lukemarsden
lukemarsden merged commit 1f8d66d into main Jul 29, 2026
5 checks passed
@lukemarsden
lukemarsden deleted the feat/zed-upstream-catchup-and-silent-agent-watchdog branch July 29, 2026 23:37
lukemarsden added a commit that referenced this pull request Jul 30, 2026
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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant