* fix(auto): prevent hang when dispatch chain breaks after slice tasks complete (#381)
After the last task in a slice completes, dispatchNextUnit() can throw
(e.g. template mismatch, branch error, or any unprotected operation).
The error propagates to the pi event emitter which silently swallows
async rejections, leaving auto-mode active but permanently stalled —
no dispatch, no stop, no recovery.
Three defensive layers added:
1. Try-catch around dispatchNextUnit in handleAgentEnd — catches errors,
shows them to the user, and schedules a retry via the gap watchdog.
2. Dispatch gap watchdog (30s timer) — fires when auto-mode is active
but no unit was dispatched after a unit completion. Re-derives state
and retries. If retry fails, stops auto-mode with diagnostics.
3. Error boundary in the agent_end event handler — last-resort catch
that pauses auto-mode if handleAgentEnd itself throws.
Closes#381
* fix: improve Cloud Code Assist 404 error with actionable model guidance (#368)
When a model like gemini-2.0-flash isn't available via Cloud Code Assist,
the 404 error now names the model and suggests using the google provider
with GOOGLE_API_KEY or switching to a supported model.