The most straightforward method is probably just to recursively marginalize the distribution, each time reducing the number of boxes and (in one branch) reducing the sum threshold. That is, $P(sum_{1..i}>n_{thresh}) = P(sum_{1..i}>n_{thresh} | picked_i)p_i + P(sum_{1..i}>n_{thresh}|\
eg picked_i)(1-p_i) = P(sum_{1..i-1}>(n_{thresh}-n_i))p_i + P(sum_{1..i-1}>n_{thresh})(1-p_i)$. Obviously, at a certain point you're looking at thresholds less than zero or greater than all the remaining boxes, which are your termination cases.
This takes exponential time in the general case, but the problem is NP-complete so that's not really negotiable.