diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx
index b161342f231d..9242d934169f 100644
--- a/apps/web/src/components/ChatView.tsx
+++ b/apps/web/src/components/ChatView.tsx
@@ -4037,6 +4037,7 @@ export default function ChatView(props: ChatViewProps) {
{embedded ? null : }
diff --git a/apps/web/src/components/chat/ChatOverlayHosts.tsx b/apps/web/src/components/chat/ChatOverlayHosts.tsx
index 6f96399f9731..55e58ca7e24b 100644
--- a/apps/web/src/components/chat/ChatOverlayHosts.tsx
+++ b/apps/web/src/components/chat/ChatOverlayHosts.tsx
@@ -196,11 +196,14 @@ export function openRevertConfirm(threadKey: string, pending: PendingRevert): vo
export function RevertConfirmHost(props: {
readonly threadKey: string;
readonly checkpoints: OrchestrationV2ThreadProjection["checkpoints"] | undefined;
+ readonly worktreePath: string | null;
readonly onConfirm: (turnCount: number, messageId: MessageId, restoreFiles: boolean) => void;
}) {
const pending = useThreadOverlay(revertConfirmAtom, props.threadKey);
+ // The server refuses file restore outside an isolated worktree.
const canRestoreFiles =
pending !== null &&
+ props.worktreePath !== null &&
findRevertCheckpoint(props.checkpoints ?? [], pending.turnCount)?.status === "ready";
const confirm = (restoreFiles: boolean) => {
if (pending === null || (restoreFiles && !canRestoreFiles)) return;