{"record":{"id":"dfd783b19995d847","repo":"paperclipai/paperclip","slug":"agent-is-not-ready-to-duplicate","errorCode":null,"errorMessage":"Agent is not ready to duplicate","messagePattern":"Agent is not ready to duplicate","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ui/src/components/AgentActionButtons.tsx","lineNumber":297,"sourceCode":"      }\n    },\n    onSuccess: (data, action) => {\n      onActionError?.(null);\n      invalidateAgent();\n      if (action === \"terminate\") {\n        if (!confirmLateNavigationChanges(agentActionStartedDirtyRef)) return;\n        onTerminateSuccess?.(data as Agent);\n      }\n      if (action === \"invoke\" && navigateToRunOnInvoke && data && typeof data === \"object\" && \"id\" in data) {\n        if (!confirmLateNavigationChanges(agentActionStartedDirtyRef)) return;\n        navigate(`/agents/${canonicalAgentRef}/runs/${(data as HeartbeatRun).id}`);\n      }\n    },\n    onError: (err) => {\n      reportError(err instanceof Error ? err.message : \"Action failed\");\n    },\n  });\n\n  const providerTraceAction = useMutation({\n    mutationFn: () =>\n      agentsApi.invoke(agent.id, resolvedCompanyId ?? undefined, {\n        debug: { providerTrace: \"raw\" },\n      }),\n    onSuccess: (run) => {\n      onActionError?.(null);\n      invalidateAgent();\n      if (navigateToRunOnInvoke) {\n        if (!confirmLateNavigationChanges(agentActionStartedDirtyRef)) return;\n        navigate(`/agents/${canonicalAgentRef}/runs/${run.id}`);\n      }\n    },\n    onError: (err) => {\n      reportError(err instanceof Error ? err.message : \"Failed to start traced run\");\n    },\n  });\n","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/components/AgentActionButtons.tsx#L279-L315","documentation":"Error \"Agent is not ready to duplicate\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/components/AgentActionButtons.tsx:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait until the agent finishes its current transition and reaches a ready state before duplicating it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}