Skip to content

🙌 OpenHands: AI-Driven Development

chore(acp): remove the archived-resume wake UI (#1276)

simonrosenberge25598c529ff
diff --git a/__tests__/api/cloud/conversation-create.test.ts b/__tests__/api/cloud/conversation-create.test.ts
index fc6a4399ed..83ea6c1c5d 100644
--- a/__tests__/api/cloud/conversation-create.test.ts
+++ b/__tests__/api/cloud/conversation-create.test.ts
@@ -117,46 +117,4 @@ describe("AgentServerConversationService cloud branch", () => {
expect(result?.status).toBe("READY");
expect(result?.app_conversation_id).toBe("conv-456");
});
-
- it("wakeRecycledCloudConversation re-provisions under the same conversation id (bootstrap resume)", async () => {
- const { wakeRecycledCloudConversation } =
- await import("#/api/cloud/conversation-service.api");
- vi.mocked(axios.request).mockResolvedValue({
- data: {
- id: "task-wake",
- created_by_user_id: null,
- status: "WORKING",
- detail: null,
- app_conversation_id: null,
- agent_server_url: null,
- request: {},
- created_at: "2026-06-08T00:00:00Z",
- updated_at: "2026-06-08T00:00:00Z",
- },
- });
-
- const result = await wakeRecycledCloudConversation("conv-existing", {
- selected_repository: "user/repo",
- selected_branch: "main",
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- git_provider: "github" as any,
- });
-
- const [config] = vi.mocked(axios.request).mock.calls[0]!;
- expect(config).toMatchObject({
- url: `${cloudBackend.host}/api/v1/app-conversations`,
- method: "POST",
- });
- const body = (config as { data: Record<string, unknown> }).data;
- // The same conversation id is carried so the backend rebuilds (and, for
- // ACP, bootstrap-resumes) the existing conversation rather than minting one.
- expect(body.conversation_id).toBe("conv-existing");
- // The repo selection rides along so the rebuilt working dir matches the
- // original cwd — otherwise an ACP resume can't key off the same project dir.
- expect(body.selected_repository).toBe("user/repo");
- expect(body.selected_branch).toBe("main");
- expect(body.git_provider).toBe("github");
- expect(result.id).toBe("task-wake");
- expect(result.status).toBe("WORKING");
- });
});
diff --git a/src/api/cloud/conversation-service.api.ts b/src/api/cloud/conversation-service.api.ts
index 44f837afcc..894e54b5ca 100644
--- a/src/api/cloud/conversation-service.api.ts
+++ b/src/api/cloud/conversation-service.api.ts
@@ -220,43 +220,6 @@ export async function resumeCloudSandbox(sandboxId: string): Promise<void> {
});
}
-/**
- * Wake a conversation whose sandbox was recycled (STOPPED/MISSING, not just
- * PAUSED). Unlike `resumeCloudSandbox`, a recycled sandbox no longer exists, so
- * a fresh one must be provisioned by re-issuing the conversation-start with the
- * SAME `conversation_id`. The backend rebuilds the conversation keyed on that
- * id and, for ACP, resumes it from the durable event store via a bootstrap
- * prompt (OpenHands#14640) so the agent continues with prior context rather
- * than starting over. Returns a WORKING task the caller polls to READY (same
- * lifecycle as a fresh create).
- *
- * The repo selection is carried so the rebuilt sandbox's working dir matches
- * the original conversation's cwd — an ACP resume keys off cwd, so a repo-backed
- * conversation woken without it would resolve a different project dir.
- */
-export async function wakeRecycledCloudConversation(
- conversationId: string,
- repoSelection?: {
- selected_repository?: string | null;
- selected_branch?: string | null;
- git_provider?: AppConversationStartRequest["git_provider"];
- },
-): Promise<AppConversationStartTask> {
- const backend = getActiveCloudBackend();
- const body: AppConversationStartRequest = {
- conversation_id: conversationId,
- selected_repository: repoSelection?.selected_repository ?? null,
- selected_branch: repoSelection?.selected_branch ?? null,
- git_provider: repoSelection?.git_provider ?? null,
- };
- return callCloudProxy<AppConversationStartTask>({
- backend,
- method: "POST",
- path: "/api/v1/app-conversations",
- body: body as unknown as Record<string, unknown>,
- });
-}
-
/**
* Read a file from a cloud conversation's sandbox workspace. Mirrors
* OpenHands' `AgentServerConversationService.readConversationFile` — hits
diff --git a/src/components/features/chat/acp-resume-archived-button.tsx b/src/components/features/chat/acp-resume-archived-button.tsx
deleted file mode 100644
index 26e932df74..0000000000
--- a/src/components/features/chat/acp-resume-archived-button.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { useTranslation } from "react-i18next";
-import { BrandButton } from "#/components/features/settings/brand-button";
-import { I18nKey } from "#/i18n/declaration";
-import { useWakeConversation } from "#/hooks/mutation/use-wake-conversation";
-import { displayErrorToast } from "#/utils/custom-toast-handlers";
-import type { AppConversation } from "#/api/conversation-service/agent-server-conversation-service.types";
-
-interface AcpResumeArchivedButtonProps {
- conversation: AppConversation;
-}
-
-/**
- * Resume affordance shown in place of the read-only "archived" notice for an
- * ACP conversation whose cloud sandbox was recycled. Waking re-provisions a
- * fresh sandbox under the same conversation id; the backend resumes the
- * conversation from the durable event store with a bootstrap prompt
- * (OpenHands#14640). The active-conversation poll then reconnects once the
- * fresh sandbox is RUNNING.
- */
-export function AcpResumeArchivedButton({
- conversation,
-}: AcpResumeArchivedButtonProps) {
- const { t } = useTranslation();
- const { mutate: wake, isPending } = useWakeConversation();
-
- return (
- <div className="flex flex-col gap-2">
- <p className="text-xs text-[var(--oh-muted)]">
- {t(I18nKey.CHAT_INTERFACE$ACP_RESUME_SANDBOX_DESCRIPTION)}
- </p>
- <BrandButton
- type="button"
- variant="primary"
- isDisabled={isPending}
- onClick={() =>
- wake(
- { conversationId: conversation.id, conversation },
- {
- onError: (error) =>
- displayErrorToast(
- error instanceof Error ? error.message : String(error),
- ),
- },
- )
- }
- testId="acp-resume-conversation-button"
- >
- {isPending
- ? t(I18nKey.CHAT_INTERFACE$ACP_RESUME_STARTING)
- : t(I18nKey.CHAT_INTERFACE$ACP_RESUME_BUTTON)}
- </BrandButton>
- </div>
- );
-}
diff --git a/src/components/features/chat/chat-interface.tsx b/src/components/features/chat/chat-interface.tsx
index c495847a76..0b1ef246e3 100644
--- a/src/components/features/chat/chat-interface.tsx
+++ b/src/components/features/chat/chat-interface.tsx
@@ -39,7 +39,6 @@ import { useTaskPolling } from "#/hooks/query/use-task-polling";
import { matchesPendingConversationId } from "#/utils/pending-task-message-link";
import { useConversationWebSocket } from "#/contexts/conversation-websocket-context";
import ChatStatusIndicator from "./chat-status-indicator";
-import { AcpResumeArchivedButton } from "./acp-resume-archived-button";
import { getStatusColor, getStatusText } from "#/utils/utils";
import { useNewConversationCommand } from "#/hooks/mutation/use-new-conversation-command";
import { useOptionalConversationId } from "#/hooks/use-conversation-id";
@@ -108,11 +107,6 @@ export function ChatInterface() {
const sandboxStatus = activeConversation?.sandbox_status ?? null;
const isArchivedConversation =
sandboxStatus === "MISSING" || sandboxStatus === "ERROR";
- // A recycled (MISSING) sandbox for an ACP conversation can be re-provisioned:
- // the backend resumes it from the durable event store with a bootstrap prompt
- // (OpenHands#14640). ERROR is a genuine failure, so it stays read-only.
- const isRecycledAcpConversation =
- sandboxStatus === "MISSING" && activeConversation?.agent_kind === "acp";
// Block sending in a resumed conversation that has no usable LLM, and show
// the same setup banner as the home screen so the dead end is explained.
@@ -567,20 +561,11 @@ export function ChatInterface() {
? t(I18nKey.CHAT_INTERFACE$ERROR_SANDBOX_TITLE)
: t(I18nKey.CHAT_INTERFACE$ARCHIVED_SANDBOX_TITLE)}
</p>
- {isRecycledAcpConversation && activeConversation ? (
- // ACP conversations resume from a recycled sandbox via a
- // bootstrap prompt (OpenHands#14640): offer to re-provision
- // instead of dead-ending.
- <div className="mt-2">
- <AcpResumeArchivedButton conversation={activeConversation} />
- </div>
- ) : (
- <p className="text-xs text-[var(--oh-muted)] mt-0.5">
- {sandboxStatus === "ERROR"
- ? t(I18nKey.CHAT_INTERFACE$ERROR_SANDBOX_DESCRIPTION)
- : t(I18nKey.CHAT_INTERFACE$ARCHIVED_SANDBOX_DESCRIPTION)}
- </p>
- )}
+ <p className="text-xs text-[var(--oh-muted)] mt-0.5">
+ {sandboxStatus === "ERROR"
+ ? t(I18nKey.CHAT_INTERFACE$ERROR_SANDBOX_DESCRIPTION)
+ : t(I18nKey.CHAT_INTERFACE$ARCHIVED_SANDBOX_DESCRIPTION)}
+ </p>
</div>
) : (
<div className="relative">
diff --git a/src/hooks/mutation/use-wake-conversation.ts b/src/hooks/mutation/use-wake-conversation.ts
deleted file mode 100644
index 522812ac67..0000000000
--- a/src/hooks/mutation/use-wake-conversation.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { useMutation, useQueryClient } from "@tanstack/react-query";
-import { wakeRecycledCloudConversation } from "#/api/cloud/conversation-service.api";
-import type { AppConversation } from "#/api/conversation-service/agent-server-conversation-service.types";
-
-/**
- * Wake a recycled (STOPPED/MISSING) cloud conversation by re-provisioning its
- * sandbox under the same conversation id. For ACP this triggers bootstrap-prompt
- * resume on the backend (OpenHands#14640) — the agent continues from the durable
- * event store. Invalidating the conversation queries drops the cached
- * MISSING/archived view; the active-conversation poll then picks up the new
- * `conversation_url` once the fresh sandbox is RUNNING and the chat reconnects.
- */
-export const useWakeConversation = () => {
- const queryClient = useQueryClient();
-
- return useMutation({
- mutationFn: (variables: {
- conversationId: string;
- conversation?: AppConversation | null;
- }) =>
- wakeRecycledCloudConversation(variables.conversationId, {
- selected_repository:
- variables.conversation?.selected_repository ?? null,
- selected_branch: variables.conversation?.selected_branch ?? null,
- git_provider: variables.conversation?.git_provider ?? null,
- }),
- onSettled: (_, __, variables) => {
- queryClient.invalidateQueries({
- queryKey: ["user", "conversation", variables.conversationId],
- });
- queryClient.invalidateQueries({ queryKey: ["user", "conversations"] });
- queryClient.invalidateQueries({
- queryKey: ["v1-batch-get-app-conversations"],
- });
- },
- });
-};
diff --git a/src/i18n/translation.json b/src/i18n/translation.json
index 5d6e0c5f40..4190c9f821 100644
--- a/src/i18n/translation.json
+++ b/src/i18n/translation.json
@@ -23238,57 +23238,6 @@
"tr": "Bu konuşmanın sandbox'ı kaldırıldı. Yukarıdaki geçmiş salt okunur modundadır.",
"uk": "Пісочницю цієї розмови видалено. Наведена вище історія доступна лише для читання."
},
- "CHAT_INTERFACE$ACP_RESUME_SANDBOX_DESCRIPTION": {
- "en": "This conversation's sandbox was recycled. Resume to continue where you left off.",
- "ja": "この会話のサンドボックスは再利用されました。再開すると、中断したところから続行できます。",
- "zh-CN": "此对话的沙盒已被回收。恢复以从上次中断的地方继续。",
- "zh-TW": "此對話的沙盒已被回收。恢復以從上次中斷的地方繼續。",
- "ko-KR": "이 대화의 샌드박스가 재활용되었습니다. 재개하여 중단한 지점부터 계속하세요.",
- "no": "Sandkassen til denne samtalen ble resirkulert. Gjenoppta for å fortsette der du slapp.",
- "ar": "تمت إعادة تدوير بيئة اختبار هذه المحادثة. استأنف للمتابعة من حيث توقفت.",
- "de": "Die Sandbox dieser Unterhaltung wurde recycelt. Setze fort, um dort weiterzumachen, wo du aufgehört hast.",
- "fr": "Le sandbox de cette conversation a été recyclé. Reprenez pour continuer là où vous vous êtes arrêté.",
- "it": "La sandbox di questa conversazione è stata riciclata. Riprendi per continuare da dove avevi interrotto.",
- "pt": "A sandbox desta conversa foi reciclada. Retome para continuar de onde parou.",
- "es": "El sandbox de esta conversación se recicló. Reanuda para continuar donde lo dejaste.",
- "ca": "El sandbox d'aquesta conversa s'ha reciclat. Reprèn per continuar on ho vas deixar.",
- "tr": "Bu konuşmanın sandbox'ı geri dönüştürüldü. Kaldığınız yerden devam etmek için sürdürün.",
- "uk": "Пісочницю цієї розмови було перероблено. Відновіть, щоб продовжити з того місця, де ви зупинилися."
- },
- "CHAT_INTERFACE$ACP_RESUME_BUTTON": {
- "en": "Resume conversation",
- "ja": "会話を再開",
- "zh-CN": "恢复对话",
- "zh-TW": "恢復對話",
- "ko-KR": "대화 재개",
- "no": "Gjenoppta samtale",
- "ar": "استئناف المحادثة",
- "de": "Unterhaltung fortsetzen",
- "fr": "Reprendre la conversation",
- "it": "Riprendi conversazione",
- "pt": "Retomar conversa",
- "es": "Reanudar conversación",
- "ca": "Reprèn la conversa",
- "tr": "Konuşmayı sürdür",
- "uk": "Відновити розмову"
- },
- "CHAT_INTERFACE$ACP_RESUME_STARTING": {
- "en": "Resuming…",
- "ja": "再開中…",
- "zh-CN": "正在恢复…",
- "zh-TW": "正在恢復…",
- "ko-KR": "재개 중…",
- "no": "Gjenopptar…",
- "ar": "جارٍ الاستئناف…",
- "de": "Wird fortgesetzt…",
- "fr": "Reprise…",
- "it": "Ripresa in corso…",
- "pt": "Retomando…",
- "es": "Reanudando…",
- "ca": "S'està reprenent…",
- "tr": "Sürdürülüyor…",
- "uk": "Відновлення…"
- },
"CHAT_INTERFACE$ERROR_SANDBOX_TITLE": {
"en": "Sandbox error",
"ja": "サンドボックスエラー",