Rollback Strategies When a Deployed Agent Regresses
Use this when production quality, safety, latency, or cost burns after an agent change.
Search across all documentation pages
Use this when production quality, safety, latency, or cost burns after an agent change.
The goal is minutes to safe, not a perfect root cause in the first five minutes.
prompt_version, tool_schema_version, model_id, code_sha, flag variations from a failing run trace.active → previous manifest, or route table → baseline.Pick the narrowest lever that removes the regression:
| Symptom cluster | Try first | Then |
|---|---|---|
| Quality drop after prompt-only change | Previous prompt_version | Full previous pin |
| Tool call storms / schema errors | Previous tool_schema_version + matching code | Disable tool via flag |
| Latency/cost after model swap | Previous model_id / route | Provider failover |
| Only canary cohort hurt | Canary percent → 0 | Keep baseline |
| Host crash / OOM / bad binary | Redeploy previous code_sha | Scale / restart |
| Partial migrations | Expand-contract down path | Feature-flag off new writes |
| Unsafe content / injection surge | Tighten policy pack + tool deny | Full agent off |
IMPACT? safety/money → kill tools + pin flip + human review of side effects
quality only → pin/flag flip first
cost/latency → model route + max_turns/spend caps, then pin
STILL BAD after pin flip?
→ code redeploy + check external pack overrides + dependency outages
NEED TIME?
→ leave agent in degrade mode (retrieve-only / draft-only) rather than thrash| Mistake | Result | Fix |
|---|---|---|
| Roll image but not pack | Behavior unchanged | Flip pack pin / flags |
| Roll pack but not schema-compatible code | Mass tool errors | Roll both as a train |
| Non-sticky residual canary | Random bad sessions | Percent 0 + verify sticky maps |
| "Fixed" by editing live prompt | Unknown version | Ship proper pin later |
| No probe after flip | False recovery | Synthetic + metric confirm |
| Re-enable canary same day without new eval | Repeat SEV | Quarantine + new gate evidence |
Target under five minutes from decision to new runs on baseline, including config propagation. If slower, invest in flags and pin stores.
No. Redeploys are slower and coarser. Use them when the binary or migrations are wrong.
That is the incident behind the incident. Freeze changes, reconstruct from git, and build pin history before the next launch.
If the outage is provider-wide, failover routes or degrade. If only your new model ID fails, roll the model pin.
Yes - force baseline for the affected org flag override while others stay candidate, then global baseline if pattern spreads.
Kill switch stops ongoing damage now. Rollback restores known good behavior for new runs. Often you do both.
Until a fixed pin passes eval, canary abort rules are satisfied, and the postmortem action items that block re-release are done.
Pin dimension shows baseline, proxy success recovered, cost/latency back in band, and no new safety SEVs - not "feels better."
If the index is versioned, point retrieval at the prior index ID. If not versioned, restore from snapshot or reindex from last good corpus pin.
Rare and written: executive/product + eng lead with explicit residual risk. Default is roll back.
Game-day: deploy a deliberate bad pin to staging, time the flip, verify probes, and fix doc gaps.
Pin IDs, gate results (why green), canary gaps, time-to-detect, time-to-rollback, and new suite cases.
Stack versions: Pins from the category manifest (verify at build): OpenRouter (~315+ models, July 2026 pricing/fees); LangGraph 1.0+; CrewAI 1.14+; Microsoft Agent Framework 1.0; Vercel AI SDK 6; Pydantic AI (latest); LlamaIndex (latest); OpenAI Agents SDK (latest + MCP); MCP (Linux Foundation governance); A2A (HTTP+SSE+JSON-RPC 2.0); Solana
@solana/web3.js+@solana/spl-token.
Reviewed by Chris St. John·Last updated Jul 16, 2026