Keep @role chat working after a failover #256
All Vouch review confidence checks passed
Residual risk 0.34 = Change Risk (0.45) × (1 − Review Confidence (0.24)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 298 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 43% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.341
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #256"
general
weight: 0.35
chatgpt-codex-connector[bot]
Problem
After a failover,
@<role>chat could not reach the role. Seen live on 2026-10-21: the planner failed over from agy (429 quota) to Claude, and@planner ...went to the backend side session with "No finished planner session is recorded".Cause:
_run_with_failoverclears the result'ssession_id, on purpose, so no later dispatch resumes a session that belongs to another agent. But the dispatch record and the in-memory chat entry then stored the configured primary provider (antigravity) withsession_id: null, so the@rolelookup had nothing to resume.Fix
DispatchResultandSubagentResultgainfallback_ranandfallback_session_id._run_with_failoversets them on both its role and support-role branches.session_idstaysNoneandsession_invalidatedstays set, so dispatch resume is unchanged._dispatched_session()inorchestrator.pyreturns the provider, session id, and fallback flag of the agent that actually ran._remember_role_session(chat entry) and_record_role_dispatch(dispatch record) use it.RoleDispatchgains afallbackflag._role_session_lookupin__main__.pyresumes a fallback session with the fallback'sAgentConfig(provider,binary,model), so chat launches the CLI that owns the session.EpicCloseResultcarries the same fields, and_remember_finalizer_sessionuses them, so@finalizerworks after a failover too.CONFIGURATION.md(Fallback Agents rules) and CHANGELOG.This covers every role dispatch: planner, tpm, backend, frontend, single auditor, and the finalizer.
Not covered: the audit fan-out reviewers. They are read-only, answer in JSON, and keep no chat session today, so their fallback behavior is unchanged.
Testing
python -m pytest tests -q: 4580 passed, 46 skipped.- failover results keep the fallback session id (role and support-role);
- planner, backend, and tpm failovers keep the fallback's provider and session for chat, and the lookup returns the fallback config;
- the dispatch record names the fallback;
- a dispatch that did not fail over still records and resumes the primary;
- a finalizer failover keeps the fallback session for
@finalizer.🤖 Generated with Claude Code