Highest derived inverse image Suppose $i_Z \hookrightarrow X$ be a closed immersion, with $Z$ and $X$ being smooth varieties over $\mathbb{C}$, and $c, d$ are the dimensions of $Z$ and $X$ respectively.
$\textbf{Question}:$ Is it true that $L_n i^*_{Z} \mathcal{F} = 0$ for any $n>d-c$ and $\mathcal{F}\in Coh(X)$ ? 
The reason I ask is the following inconsistency I encounter (suppose $d=2$ and $c=1$ for simplicity), 
\begin{equation}
E_2^{p,q}:= Ext_Z^p(L_q i^*_{Z}\mathcal{F},\mathcal{O}_Z) \Longrightarrow E^{p+q}_{\infty} = Ext_Z^{p+q}(L i^*_{Z}\mathcal{F},\mathcal{O}_Z)=Ext_X^{p+q}(\mathcal{F},i_{Z *} \mathcal{O}_Z).
\end{equation} 
Note that $E_2^{1,2}$ survives to infinity, so $Ext_X^{3}(\mathcal{F},i_{Z *} \mathcal{O}_Z) \ne 0$, this is absurd because $X$ is a surface and $Ext_X^3 = 0$. But this must be true for any curve $Z\subset X$, and any sheaf over that (not just the structure sheaf $\mathcal{O}_Z$). So I got the question above.
This is puzzling for me because in general there is a resolution by locally free sheaves (again I just assume $d=2$),
\begin{equation}
0 \longrightarrow V^{2}\longrightarrow V^1 \longrightarrow V^0 \longrightarrow \mathcal{F}\longrightarrow 0,
\end{equation}
and $L_n i_Z^* \mathcal{F} = \mathcal{H}^{-n} i_Z^* (V^{\bullet})$, so why if $n=2$ the corresponding cohomology should be zero?
 A: Since $i_*$ is exact, we get isomorphisms
$$i_*L_ji^* \mathscr F \cong L_j(i_*i^*) \mathscr F.$$
Moreover, $i_*$ is faithful (in fact, it has a left inverse $i^*$), thus to show that $L_ji^* \mathscr F$ vanishes for $j > \dim(X) - \dim(Z)$, it suffices to show the same statement for $L_j(i_*i^*)\mathscr F$. But the functor $i_*i^*$ can also be described as $-\otimes_{\mathcal O_X} \mathcal O_Z$, so its derived functor is
$$\mathscr Tor_j^{\mathcal O_X}(-,\mathcal O_Z) = \underline H^{-j}\left(-\overset{\mathbb L}{\underset{\mathcal O_X}\otimes}\mathcal O_Z\right).$$
Now $\mathscr Tor(-,\mathcal O_Z)$ (equivalently, $-\otimes^{\mathbb L} \mathcal O_Z$) can be computed using a resolution for $\mathcal O_Z$ instead.

Lemma. Let $i \colon Z \to X$ be a regular closed immersion of Noetherian schemes that is locally cut out by $\leq n$ equations. Then $\mathcal O_Z \in D(\mathcal O_X)$ has tor amplitude $[-n,0]$.

For example, a smooth subvariety $Z$ of a smooth variety $X$ is a regular immersion that is locally cut out by $\dim X - \dim Z$ equations [Tag 0E9J]. See also Hartshorne, Theorem II.8.17.
Proof. The statement is local on $X$ [Tag 08BS], so we may assume that $X = \operatorname{Spec} A$ is affine and $Z$ is cut out by an ideal $I = (f_1,\ldots,f_n)$. Then we may take the Koszul resolution
$$K_\bullet(A,f_1,\ldots,f_n) \stackrel\simeq\to \mathcal O_Z[0] = A/I[0].$$
This is a resolution of length $n$ by free $A$-modules, showing that $A/I$ has tor amplitude $[-n,0]$ in $D(A)$ by [Tag 0654]. $\square$
If you prefer a less derived argument, what we're really doing is computing $\mathscr Tor_j(-,\mathcal O_Z)$ by locally using the Koszul resolution of $\mathcal O_Z$ associated with a regular sequence cutting out $Z$; this can be done in a none-fancy setting.
