Q:

Lurie's approach to the bar-cobar adjunction

I've been trying to read Jacob Lurie's approach to the bar-cobar constructions (Higher algebra §5.2 in the 2014-09 version) but I don't recognize what I know about these constructions. I wonder if anybody has already digested this.
Before I can ask my question, I need to recall some elements of Lurie's work.
In 5.2.1 he considers the twisted arrow category $TwAr({\cal C})$ for ${\cal C}$ an $\infty$-category.
Essentially the objects are maps $f:X\to Y\in {\cal C}$ and maps from $f$ to $f':X'\to Y'$ are pairs of maps $(X\to X',Y'\to Y)$ such that the obvious square commutes.
$(f:X\to Y) \mapsto (X,Y)$ defines a functor $TwAr({\cal C})\to {\cal C}\times {\cal C}^{op}$.
This functor is the right fibration classified by the mapping space functor : $Map:{\cal C}^{op}\times {\cal C}\to {\cal S}$ (where ${\cal S}$ is the $\infty$-category of Kan complexes).
Then, Lurie develops the formalism of bimodules and adjunctions representing them.
A pairing is a functor $M:{\cal C}\times {\cal D}\to {\cal S}$, we say that it is representable in the first variable if there exists a functor $f:{\cal C}\to {\cal D}$ such that $M(X,Y) = Map(f(X),Y)$. Same thing for the second variable with a functor $g:{\cal D}\to {\cal C}$. If $M$ is representable in both variables, the functor $f$ and $g$ are adjoint.
In 5.2.2, ${\cal C}$ is assumed symmetric monoidal and Lurie considers monoids in $TwAr({\cal C})$. 
Such a monoid is a map $f:A\to C$ from a monoid $A$ to a comonoid $C$ satisfying some unusual condition (*): essentially, the map $\Delta_Cfm_A:A\otimes A\to A\to C\to C\otimes C$ must be equal to $f\otimes f$.
Then, essentially because the functor $Map$ is always lax monoidal, we get a pairing $Mon(TwAr({\cal C}))\to Mon({\cal C})\times Mon({\cal C}^{op})$.
The main result (Thm 5.2.2.17) is that this pairing is representable in both variables when ${\cal C}$ satisfies some mild assumptions. 
The corresponding adjunction is the bar-cobar adjunction for monoids and comonoids in ${\cal C}$.
It is written
$$
Map_{Mon({\cal C})}(A,Cobar(C)) = Map_{coMon({\cal C})}(Bar(A),C).
$$
Remark : this result is perfectly symmetric in ${\cal C}$ and ${\cal C}^{op}$ replacing one by the another gives the exact same adjunction.
Now, here is what I find strange: classically the bar-cobar adjunction is going the other way (Bar is right adjoint and Cobar left adjoint) so why the change here ?
Variation on the same question : the classical the bar-cobar adjunction is related to "twisting cochains" which are Maurer-Cartan elements in the convolution dg-algebra $[C,A]$, hence some kind of maps from the comonoid $C$ to the monoid $A$. But in Higher Algebra the adjunction is related to maps from $A$ to $C$. Is there a way to relate twisting cochains $\alpha:C\to A$ to maps $f:A\to C$ satisfying the condition (*) ?
Last remark : a version of the convolution algebra does appear in Lurie's approach, provided we consider comonoids in $TwAr({\cal C})$ instead of monoids.
They correspond to maps $f:C\to A$ from a comonoid $C$ to a monoid $A$ which are idempotent for the convolution product in the (external) convolution algebra $Map(C,A)$ (this is the condition dual to (*)).
I'm puzzled...
I'll be glad if anybody has some insight into this.

A:

I really like this question, I've been trying to sort out some of these ideas for a little while. I don't know the answer to your questions about conilpotence and twisting morphisms vs twisted arrows. I do have reason to believe that twisted arrows between A and C are the same as the twisted arrows from A to conil(C) but I don't know how to prove that.
I think Gabriel's answer is worth expanding on. Lurie is describing an adjunction between infinity categories: Alg and Coalg. The bar and cobar construction you mention are between categories---let me denote them by ALG and COALG [and I mean conilpotent coalg]---and so must be equipped with weak equivalences in order to induce functors on the infinity categories. 
To model Alg, we equip ALG with quasi-isomorphisms. To model Coalg [or rather, conilCoalg], we must equip COALG with quasi-isomorphisms too. However, the classical bar and cobar construction are not homotopical between these relative (or model) categories. 
However, we have a second class of weak equivalences on COALG---you called them fancy---that makes this adjunction into a Quillen pair, and as you point out, this Quillen pair is an equivalence. Gabriel's point, though, is that (COALG, fancy) left localizes to (COALG, quasi-iso). Conjugating this localization by the ``bar-cobar as equivalence between (ALG, quasi-iso) and (COALG, fancy)" will show you that this left adjoint from (COALG, fancy) to (COALG, quasi-iso) models Lurie's infinity left adjoint from Alg to Coalg, and it is defined by something that looks like the classical bar construction. 

