OpenHands/OpenHands · warning · Error
Public sharing requires a cloud backend.
Error message
Public sharing requires a cloud backend.
What it means
Thrown by updateConversationPublicFlag when the active backend is not cloud. Public sharing (shareable conversation links) is a cloud-only feature backed by the cloud API's updateCloudConversationPublicFlag endpoint. Local agent-server conversations have no concept of public sharing, so the method explicitly rejects non-cloud backends.
Source
Thrown at src/api/conversation-service/agent-server-conversation-service.api.ts:587
if (getActiveBackend().backend.kind === "cloud") {
return batchGetCloudConversations(ids);
}
const data = await new ConversationClient(
getAgentServerClientOptions(),
).getConversations<DirectConversationInfo>(ids);
return requireDirectConversationItems(data).map((item) =>
toAppConversation(item),
);
}
static async updateConversationPublicFlag(
conversationId: string,
isPublic: boolean,
): Promise<AppConversation> {
if (getActiveBackend().backend.kind !== "cloud") {
throw new Error("Public sharing requires a cloud backend.");
}
return updateCloudConversationPublicFlag(conversationId, isPublic);
}
static async updateConversationRepository(
conversationId: string,
repository: string | null,
branch?: string | null,
gitProvider?: string | null,
): Promise<AppConversation> {
if (repository) {
const existing = getStoredConversationMetadata(conversationId);
setStoredConversationMetadata(conversationId, {
...(existing ?? {}),
selected_repository: repository,
selected_branch: branch ?? null,
git_provider: (gitProvider as Provider | null | undefined) ?? null,
});View on GitHub (pinned to 500b4c533e)
Solutions
- Hide the public-share UI control when the active backend is local (check getActiveBackend().backend.kind in the component).
- If the user switched backends, close any open share dialogs and reset the share state.
- Ensure the feature flag or UI condition for showing the share toggle includes a backend.kind === 'cloud' check.
Example fix
// before: share toggle visible regardless of backend
{showShareButton && <ShareToggle onChange={...} />}
// after: gate on cloud backend
{showShareButton && getActiveBackend().backend.kind === 'cloud' && <ShareToggle onChange={...} />} Defensive patterns
Strategy: validation
Validate before calling
import { getActiveBackend } from '#/api/backend-registry/active-store';
function canShareConversation(): boolean {
return getActiveBackend().backend.kind === 'cloud';
}
// Before showing share UI:
if (!canShareConversation()) {
hideShareButton();
} Type guard
function isPublicShareRequiresCloud(e: unknown): boolean {
return e instanceof Error && e.message === 'Public sharing requires a cloud backend.';
} Try / catch
try {
await AgentServerConversationService.updateConversationPublicFlag(id, isPublic);
} catch (error) {
if (error instanceof Error && error.message.includes('requires a cloud backend')) {
showToast('Public sharing is only available with a cloud backend');
return;
}
throw error;
} Prevention
- Gate the share/public-toggle UI on getActiveBackend().backend.kind === 'cloud'.
- Close share dialogs when switching from cloud to local backend.
- Add a feature-flag check alongside the backend-kind check for defense in depth.
When it happens
Trigger: The UI calls AgentServerConversationService.updateConversationPublicFlag(conversationId, true) when getActiveBackend().backend.kind is 'local' instead of 'cloud'. This happens if the public-share toggle is visible/enabled on a local backend conversation, or if the user switched from cloud to local while the share dialog was open.
Common situations: UI bug where the share button is shown for local conversations; user switched backends (cloud -> local) while a cloud conversation's share modal was open; the share feature was enabled without checking backend kind in the component.
Related errors
- Branching a conversation isn't supported on the cloud backen
- Conversation sandbox is still starting. Wait for it to finis
- Conversation sandbox is still starting. Wait for it to finis
- Invalid response from runtime - runtime may be unavailable
- OAuth authorization requires a reachable local backend.
AI-assisted analysis of OpenHands/OpenHands@500b4c533e (2026-08-12).
Data as JSON: /api/errors/b55435f671c461f5.
Report an issue: GitHub.