Detect the recovery trigger
Trigger recovery when approval expires, a reply contradicts the plan, a tool fails, a human takes over, or the user says the answer was wrong.
Summarize the thread state
Include the original ask, the pending action, the latest user message, and any tool or handoff result that changes the plan.
Name what not to repeat
The prompt should explicitly avoid the failed action, stale assumption, unsupported claim, or old approval window.
Offer a safe next message
Draft a short text that asks for the missing detail, confirms the revised plan, or reports that the agent stopped safely.
Log the outcome
Store whether the recovery message resolved the task, created a handoff, or should update future routing rules.