capturing small sets in small factors Suppose $\kappa$ is a regular cardinal and $P$ is a $\kappa$-c.c. partial order.  I want to know when are small sets added by subforcings of size $<\kappa$.  The following seems well-known:

Fact: If $\kappa$ is weakly compact, and $P$ has size $\kappa$ and is $\kappa$-c.c., then for any $P$-name $\tau$ for a set of ordinals of size $<\kappa$, there is a $Q \lhd P$ and a $Q$-name $\sigma$ such that $|Q| < \kappa$, and $1 \Vdash_P \sigma = \tau$.

I think the easiest way to see the fact is to use the extension property.  Every such $P$ can be coded as a set of ordinals $A \subseteq \kappa$, and there is some transitive $X$ of rank > $\kappa$ and a set $B$ such that $(V_\kappa,\in,A) \prec (X,\in,B)$.  Any $P$-name for a small set is seen by the larger structure as captured by $P$, so this reflects.
Question 1: Are there counterexamples for some large cardinals which are weaker than weakly compact?
If $\kappa$ is supercompact, then the same conclusion holds for all $\kappa$-c.c. $P$.  This is easy to see by taking a supercompactness embedding $j$ with closure at least $|P|$ and noting that $j[P]$ is a regular suborder of $j(P)$.  Supercompactness must be a total overkill hypothesis.
Question 2: For what cardinals $\kappa$ do we have that every $\kappa$-c.c. partial order captures small sets in small factors?

Update:  I think I have a partial answer to Question 2.  Supercompactness is indeed overkill, and weak compactness is enough after all.  Let $\kappa$ be weakly compact, and $P$ be $\kappa$-c.c.  Let $\theta > \kappa$ be regular such that $P \in H_\theta$.  Let $\tau$ be any $P$-name for a $<\kappa$ sized set of ordinals.  Let $M \prec H_\theta$ be such that $P,\tau \in M$, $|M| \leq \kappa$, and $M^{<\kappa} \subseteq M$.  This is possible just because $\kappa$ is inaccessible.  Then $P \cap M$ is a regular suborder of $P$, since all antichains contained in $P \cap M$ are members of $M$, and $M$ knows which ones are maximal.  By the Fact, there is $Q \lhd P \cap M \lhd P$ and a $Q$-name $\sigma$ such that $|Q| < \kappa$ and $\Vdash_{P \cap M} \tau = \sigma$.
 A: We now have a full answer.  The capturing property is equivalent to weak compactness.
Yair already covered the non-inaccessible case.  Now we show that this property implies the tree property at $\kappa$.  If there is a $\kappa$-Aronszajn tree $T$, then there is a $\kappa$-c.c. forcing due to Baumgartner that makes $\kappa = \aleph_1$ and makes $T$ special.  Conditions consist of finite partial functions from $T$ into $\omega$ with the property that comparable nodes are assigned different colors.  Call this forcing $\mathbb P$ and let $\dot f$ be the canonical name for the generic specializing function.
Assume there is a regular $\mathbb Q \subseteq \mathbb P$ that captures $\dot f \restriction T_\omega$.  WLOG $\mathbb Q$ is upward-closed in $\mathbb P$ (we can weaken conditions).  Let $S$ be the set of nodes in $T$ that appear in any condition in $\mathbb Q$.
First we claim that for all $n \in \omega$ and all $s \in S$, $\{ (s,n) \} \in \mathbb Q$.  If not, then for some $n$, $\Vdash_\mathbb Q \dot f(\check s) \not= n$.  But we can take a generic $G \subseteq \mathbb P$ with $\dot f(\check s) = n$ and $G \cap \mathbb Q$ is generic, contradiction.
Second, if $X \subseteq S$ is any infinite ground model set, then a density argument shows that $\Vdash_{\mathbb Q} \mathrm{ran}(\dot f \restriction \check X) = \omega$.
Therefore take any $t \in T \setminus S$, and let $X = \{ s \in S : s < t \}$, which is infinite.  If $G \subseteq \mathbb Q$ is generic, then a further forcing adds the specializing function on all of $T$.  But there is no possible value left for $f(t)$.
A: Assume that a regular cardinal $\kappa > \omega_1$ has the property that for every $\kappa$.c.c. forcing notion $\mathbb{P}$ and name of set of ordinals $x \in V^{\mathbb{P}}$ smaller than $\kappa$, there is a subforcing $\mathbb{Q}$ of cardinality less than $\kappa$ that already decides the value of $x$. 
We will show that $\kappa$ is Mahlo. The proof shows that in order to conclude that $\kappa$ is Mahlo, we only need that for every $\kappa$.c.c. forcing that adding a real there is a regular subforcing of smaller cardinality that adds this real.  
Assume, for a start, that at every uncountable non-weakly compact regular cardinal there is a Suslin tree. 
Let start by showing that in this case $\kappa$ must be inaccessible. Assume that $\lambda$ is the first cardinal such that $2^\lambda \geq \kappa$ (so $2^{<\lambda} < \kappa$).
Let $T$ be a Suslin tree at $\kappa$ and let choose an almost disjoint family of subsets of $\lambda$ with size $\kappa$, $\mathcal{A} \in V$. Now, forcing a branch to $T$ is $\kappa$.c.c.. The forcing that codes it into a subset of $\lambda$ is $2^{<\lambda}$-centered and therefore $\kappa$.c.c. in $V^T$ (note that if $\lambda$ is singular, this forcing is not closed at all). So the iteration is $\kappa$.c.c., but we can't have a small sub-forcing that adds the code for the branch, since it must add the branch itself.
Now, let drop the assumption the there are many Suslin trees. Instead, we use the fact that for every successor cardinal $\lambda$ there are two $\lambda$.c.c. posets of size $\lambda$ such that their product that is not $\lambda$.c.c. (and replace "forcing with Suslin tree" by forcing with one of them and get that the small subforcing can't add a the subset that codes a large antichain in the other one). I think that Assaf Rinot proved that this holds for every successor of regular cardinal and Shelah proved that this holds for every successor of singular (see Complicated Colorings).  
Now, let show that $\kappa$ must be Mahlo.
Assume that $\kappa$ is non-Mahlo inaccessible. Using the coding method of Jensen and Solovay (from "Some applications of almost disjoint sets") we can code a generic of Levi collapse $Col(\omega,<\kappa)$ into a real with some additional $c.c.c.$ forcing. The iteration is again $\kappa$.c.c., but since $V[x] \models \kappa = \aleph_1$, we can't add this real with any forcing smaller than $\kappa$.
