equivalences in/of $(\infty,1)$-categories
An ordinary category is idempotent complete, aka Karoubi complete or Cauchy complete , if every idempotent splits. Since the splitting of an idempotent is a limit or colimit of that idempotent, any category with all finite limits or all finite colimits is idempotent complete.
In an (∞,1)-category the idea is the same, except that the notion of idempotent is more complicated. Instead of just requiring that $e\circ e = e$, we need an equivalence $e\circ e \simeq e$, together with higher coherence data saying that, for instance, the two derived equivalences $e\circ e\circ e \simeq e$ are equivalent, and so on up. In particular, being idempotent is no longer a property of a morphism, but structure on it.
It is still true that a splitting of an idempotent in an $(\infty,1)$-category is a limit or colimit of that idempotent (now regarded as a diagram with all its higher coherence data), but this limit is no longer a finite limit; thus an $(\infty,1)$-category can have all finite limits without being idempotent-complete.
Let $Idem^+$ be the nerve of the free 1-category containing a retraction, with $e:X\to X$ the idempotent, $r:X\to Y$ the retraction, and $i:Y\to X$ the section (and $e = i r$ and $r i = 1_Y$). Let $Idem$ be the similar nerve of the free 1-category containing an idempotent, which is the full sub-simplicial set of $Idem^+$ spanned by the object $X$. Let $Ret$ be the image in $Idem^+$ of the 2-simplex $\Delta^2 \to Idem^+$ exhibiting the composite $r i = 1_Y$; thus $Ret$ is also the quotient of $\Delta^2$ that collapses the 1-face to a point.
Let C be an $\infty$-category, incarnated as a quasi-category.
An idempotent morphism in C is a map of simplicial sets $Idem \to C$. We will refer to $Fun(Idem, C)$ as the $(\infty,1)$-category of idempotents in $C$.
A weak retraction diagram in $C$ is a homomorphism of simplicial sets $Ret \to C$. We refer to $Fun(Ret, C)$ as the $(\infty,1)$-category of weak retraction diagrams in $C$.
A strong retraction diagram in $C$ is a map of simplicial sets $Idem^+ \to C$. We will refer to $Fun(Idem+, C)$ as the $(\infty,1)$-category of strong retraction diagrams in $C$.
An idempotent $F \colon Idem \to C$ is effective if it extends to a map $Idem^+ \to C$.
(Lurie, above corollary 4.4.5.14)
An idempotent diagram $F \colon Idem \to C$ is effective precisely if it admits an (∞,1)-limit, equivalently if it admits an (∞,1)-colimit.
By (Lurie, lemma 4.3.2.13).
$C$ is called an idempotent complete $(\infty,1)$ if every idempotent is effective.
(Lurie, above corollary 4.4.5.14)
The following properties generalize those of idempotent-complete 1-categories.
A small (∞,1)-category is idempotent-complete if and only if it is accessible.
This is HTT, 5.4.3.6.
For $C$ a small (∞,1)-category and $\kappa$ a regular cardinal, the (∞,1)-Yoneda embedding $C \to C' \hookrightarrow Ind_\kappa(C)$ with $C'$ the full subcategory on $\kappa$-compact objects exhibits $C'$ as the idempotent completion of $C$.
This is HTT, lemma 5.4.2.4.
We may also ask how idempotent-completeness of $C$ is related to that of its homotopy category $h C$. An idempotent in $h C$ is an “incoherent idempotent” in $C$, i.e. a map $e:X\to X$ such that $e \sim e^2$, but without any higher coherence conditions. In this case we have:
(HA Lemma 1.2.4.6) If $C$ is stable, then $C$ is idempotent-complete (i.e. every coherent idempotent is effective) if and only if $h C$ is (as a 1-category).
However, if $C$ is not stable, this is false. The following counterexample in ∞Gpd is constructed in Warning 1.2.4.8 of HA. Let $\lambda : G \to G$ be an injective but non-bijective group homomorphism such that $\lambda$ and $\lambda^2$ are conjugate. (One such is obtained by letting $G$ be the group of endpoint-fixing homeomorphisms of $[0,1]$, with $\lambda(g)$ acting as a scaled version of $g$ on $[0,\frac 1 2]$ and the identity on $[\frac 1 2,1]$. Then $\lambda(g) \circ h = h \circ \lambda^2(g)$ for any $h$ such that $h(t) = 2t$ for $t \in [0,\frac 1 4]$.)
Then $B\lambda : B G \to B G$ is homotopic to $B\lambda^2$, hence idempotent in the homotopy category. If it could be lifted to a coherent idempotent, then the colimit of the diagram
would be its splitting, and hence the map $B G \to \colim (B G\xrightarrow{B \lambda} B G \to\cdots)$ would have a section. Passing to fundamental groups, $G \to \colim (G\xrightarrow{\lambda} G \to\cdots)$ would also have a section; but this is impossible as $\lambda$ is injective but not surjective.
However, we do have the following:
(HA Lemma 7.3.5.14 in older versions, HTT Proposition 4.4.5.20 in newer versions) A morphism $e$ in an $(\infty,1)$-category $C$ is idempotent (i.e. $e:\Delta^1 \to C$ extends to $Idem$) if and only if there is a homotopy $h : e \sim e^2$ such that $h\circ 1 \sim 1\circ h$.
In other words, an incoherent idempotent can be fully coherentified as soon as it admits one additional coherence datum.
Section 4.4.5 of
Formalization in homotopy type theory: