TITLE: Do topos-valued sheaves form a topos?
QUESTION [14 upvotes]: Let $\bf C$ be a category, $\mathcal S$ an (elementary) topos.
If $\mathcal S$ is a presheaf category over $\bf D$, then it's easy to see $[\mathbf C^{\rm op},\, \mathcal{S}] \cong [(\mathbf C \times \mathbf D)^{\rm op},\, \mathcal{Sets}]$ is still a topos. In more general situations I struggle to see an easy reason for it to be true as well. Thus:

When is the category $[\mathbf C^{\rm op},\, \mathcal S]$ of contravariant functors from $\bf C$ to $\mathcal S$ a topos?

REPLY [3 votes]: Rather than a full-fledged answer, this is a sketch of a plan:
As you yourself pointed out, if $\mathcal S=[\bf D^{\rm op},\, \mathcal \cal{Sets}] $, the result is trivial.
Now, suppose you consider an arbitrary elementary topos $\mathcal S$. The steps would be:

Use the representation theorem  of Joyal-Tierney to embed your target topos as the equivariant sheaves over a localic topos, see here.
$E:\mathcal S \to  Set^{\mathcal{L}^{op}}$

Now each map $[\bf C^{\rm op},\, \mathcal S]$  composes with the embedding $E$ and thus lands into a localic topos.

The last step would be to see how $[\bf C^{\rm op},\, E(\mathcal S)]$  sits inside  $[\bf C^{\rm op},\, Set^{\mathcal{L}^{op}}]$.


Conjecture: under some some conditions (to be determined, but see this post When is a reflective subcategory of a topos a topos?  ) there is a reflection which is sufficiently exact to ensure that it is indeed a subtopos of $[(\bf C \times \bf\mathcal{L})^{\rm op},\, \cal{Sets}]$