Skip to content

Commit 42e50d4

Browse files
authored
Merge pull request #37 from helixml/fix/agent-type-serialization-and-debug-logging
fix: call ensure_thread_subscription in open_existing_thread_sync
2 parents 4fc839a + 47950a9 commit 42e50d4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

crates/external_websocket_sync/src/thread_service.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,15 @@ fn open_existing_thread_sync(
16191619
log::info!("📋 [THREAD_SERVICE] Registered thread: {} (strong reference)", acp_thread_id);
16201620
}
16211621

1622+
// CRITICAL: Subscribe to thread events so streaming responses sync to Helix.
1623+
// This mirrors create_new_thread_sync (line ~1218). Without this call,
1624+
// after a Zed restart the thread loads successfully but its NewEntry /
1625+
// EntryUpdated / Stopped events have no listener, so message_added is
1626+
// never emitted and the interaction stays stuck in "waiting" forever.
1627+
cx.update(|cx| {
1628+
ensure_thread_subscription(&thread_entity, &acp_thread_id, cx);
1629+
});
1630+
16221631
// Send agent_ready event to Helix (signals that agent is ready to receive prompts)
16231632
// (THREAD_LOAD_IN_PROGRESS is cleared by the ClearLoadingGuard drop guard)
16241633
let agent_name_for_ready = request_clone.agent_name.clone().unwrap_or_else(|| "zed-agent".to_string());

0 commit comments

Comments
 (0)