diff --git a/doc/grok-bot-agent.md b/doc/grok-bot-agent.md
index dc842362b26..ee04b8a6f3c 100644
--- a/doc/grok-bot-agent.md
+++ b/doc/grok-bot-agent.md
@@ -22,7 +22,9 @@ Use **Save & exit** to preserve unfinished setup. See the official
Manage the Bot from its agent's **Runtime** settings. This shows connection
health, routine configuration, and verification. Model selection, local paths,
and runtime tests are managed outside Paperclip; use **Verify connection** to
-check both directions.
+check both directions. Use **Reconnect agent access** to restore the same agent's
+connection. Select **Copy code** beside the masked one-use pairing code, then
+paste it into Paperclip's authorization page. Keep it out of Bot chat.
Assign ordinary tasks to the agent. Read its progress, answer its question cards,
and review its documents and files in the task thread. The Bot can initiate a
diff --git a/ui/src/components/GrokBotConnection.tsx b/ui/src/components/GrokBotConnection.tsx
index 0aa3fd32060..0e7e7bc2c7c 100644
--- a/ui/src/components/GrokBotConnection.tsx
+++ b/ui/src/components/GrokBotConnection.tsx
@@ -1,15 +1,17 @@
-import { useEffect, useRef, useState } from "react";
+import { useEffect, useId, useRef, useState } from "react";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import type { DotPairing } from "@paperclipai/shared";
import { grokBotApi } from "@/api/grokBot";
import { buildGrokAccessPrompt, buildGrokRoutinePrompt } from "@/lib/grok-bot-setup-prompt";
import { AgentSetupPrompt } from "./AgentSetupPrompt";
-import { Button } from "./ui/button";
+import { CopyText } from "./CopyText";
+import { Button, buttonVariants } from "./ui/button";
import { Input } from "./ui/input";
import { queryKeys } from "@/lib/queryKeys";
/** Configuration writes update the authoritative binding, never an unsaved agent form. */
export function GrokBotConnection({ companyId, agentId }: { companyId?: string; agentId?: string }) {
+ const pairingCodeId = useId();
const cache = useQueryClient();
const key = ["grok-binding", companyId, agentId];
const state = useQuery({ queryKey: key, enabled: !!companyId && !!agentId,
@@ -75,7 +77,14 @@ export function GrokBotConnection({ companyId, agentId }: { companyId?: string;
{pairing && state.data?.resourceUrl && <>
-
+
+
+
+ e.target.select()} />
+ Copy code
+
+
Copy this code into Paperclip’s authorization page. Keep it out of Bot chat.
+
>}
>}
{binding?.assignment &&
{binding.assignment.status === "offered" ? "Awaiting acknowledgement" : "Working in a Paperclip work session"}
Revokes this session’s Paperclip authority and stops future dispatch. Remote execution may continue. Open Grok Bot to inspect it.