AgentOrchestrator.runTurn line 321 sets t2AvailableForThisTurn = (decision.tier != .t3Cloud) — i.e. true on every local vision turn. But MissingT2Provider is the only T2 wired in production. When T1 returns low-confidence and the orchestrator escalates to T2, it hits MissingT2Provider, which throws t2ProviderUnavailable, and the turn dies silently.
"Wired but dead" shape
Same pattern as the 2026-05-12 facts.source_turn_id FK bug (commit a5999e2): code paths LOOK right in isolation; the production wiring contradicts the assumption.
Router tests pass t2Available: false explicitly → they pass.
Production passes true → real turns die.
The integration boundary is where the test surface stops and reality starts.
AgentCore has zero image+escalation tests against production wiring — that's the structural gap that lets this bug exist.
Recommended fix
Option A (cheap, correct): change line 321 to read the actual provider availability — t2AvailableForThisTurn = (decision.tier != .t3Cloud && hasRealT2Provider). Plumb a flag through installVision that reflects whether the real T2 sidecar is wired or only MissingT2Provider.
Option B (more invasive): make evaluatePostResponse aware of the T2 provider identity, not just a boolean.
Test
Add an integration test in AgentCoreTests that exercises image input + low-confidence T1 + MissingT2Provider end-to-end and asserts the turn does NOT die.
None — this is a NEW finding, not previously tracked.
## Summary
`AgentOrchestrator.runTurn` line 321 sets `t2AvailableForThisTurn = (decision.tier != .t3Cloud)` — i.e. `true` on every local vision turn. But `MissingT2Provider` is the only T2 wired in production. When T1 returns low-confidence and the orchestrator escalates to T2, it hits `MissingT2Provider`, which throws `t2ProviderUnavailable`, and the turn dies silently.
## "Wired but dead" shape
Same pattern as the 2026-05-12 `facts.source_turn_id` FK bug (commit `a5999e2`): code paths LOOK right in isolation; the production wiring contradicts the assumption.
- Router tests pass `t2Available: false` explicitly → they pass.
- Production passes `true` → real turns die.
- The integration boundary is where the test surface stops and reality starts.
## Evidence
- `packages/AgentOrchestrator/Sources/AgentOrchestrator/AgentOrchestrator.swift:321`
- AgentCore has **zero image+escalation tests against production wiring** — that's the structural gap that lets this bug exist.
## Recommended fix
Option A (cheap, correct): change line 321 to read the actual provider availability — `t2AvailableForThisTurn = (decision.tier != .t3Cloud && hasRealT2Provider)`. Plumb a flag through `installVision` that reflects whether the real T2 sidecar is wired or only `MissingT2Provider`.
Option B (more invasive): make `evaluatePostResponse` aware of the T2 provider identity, not just a boolean.
## Test
Add an integration test in AgentCoreTests that exercises image input + low-confidence T1 + MissingT2Provider end-to-end and asserts the turn does NOT die.
## Source
Audit `.planning/audit-2026-05-12/vision-audit.md` (2026-05-12)
## Carry-forward
None — this is a NEW finding, not previously tracked.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
AgentOrchestrator.runTurnline 321 setst2AvailableForThisTurn = (decision.tier != .t3Cloud)— i.e.trueon every local vision turn. ButMissingT2Provideris the only T2 wired in production. When T1 returns low-confidence and the orchestrator escalates to T2, it hitsMissingT2Provider, which throwst2ProviderUnavailable, and the turn dies silently."Wired but dead" shape
Same pattern as the 2026-05-12
facts.source_turn_idFK bug (commita5999e2): code paths LOOK right in isolation; the production wiring contradicts the assumption.t2Available: falseexplicitly → they pass.true→ real turns die.Evidence
packages/AgentOrchestrator/Sources/AgentOrchestrator/AgentOrchestrator.swift:321Recommended fix
Option A (cheap, correct): change line 321 to read the actual provider availability —
t2AvailableForThisTurn = (decision.tier != .t3Cloud && hasRealT2Provider). Plumb a flag throughinstallVisionthat reflects whether the real T2 sidecar is wired or onlyMissingT2Provider.Option B (more invasive): make
evaluatePostResponseaware of the T2 provider identity, not just a boolean.Test
Add an integration test in AgentCoreTests that exercises image input + low-confidence T1 + MissingT2Provider end-to-end and asserts the turn does NOT die.
Source
Audit
.planning/audit-2026-05-12/vision-audit.md(2026-05-12)Carry-forward
None — this is a NEW finding, not previously tracked.