merge(dev): resolve background-agent delegated fallback conflicts

Reconcile the latest dev branch changes with the delegated child-session fallback work. Preserve the upstream background-agent updates while keeping the delegated bootstrap cleanup and compatibility wiring fixes intact, then re-verify the affected regression suites and typecheck.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
tw-yshuang
2026-05-11 03:02:14 +08:00
668 changed files with 44608 additions and 6160 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# src/hooks/runtime-fallback/ — Reactive Provider Error Recovery
**Generated:** 2026-04-11
**Generated:** 2026-05-08
## OVERVIEW
@@ -132,7 +132,8 @@ export function classifyErrorType(error: unknown): string | undefined {
/exhausted\s+your\s+capacity/i.test(message) ||
/out\s+of\s+credits?/i.test(message) ||
/payment.?required/i.test(message) ||
/usage\s+limit/i.test(message)
/usage\s+limit/i.test(message) ||
/credit\s+balance.*too\s+low/i.test(message)
) {
return "quota_exceeded"
}
@@ -28,6 +28,10 @@ export function findNextAvailableFallback(
): string | undefined {
for (let i = state.fallbackIndex + 1; i < fallbackModels.length; i++) {
const candidate = fallbackModels[i]
if (candidate === state.currentModel) {
log(`[${HOOK_NAME}] Skipping fallback model (same as current)`, { model: candidate, index: i })
continue
}
if (!isModelInCooldown(candidate, state, cooldownSeconds)) {
return candidate
}