Skip to content

Commit af1f2e2

Browse files
open-design-crew[bot]xiaoche-hubcursoragent
authored
feat(web): surface actionable run-failure guidance for common errors (#5308)
The daemon already classifies run failures into failure_category / user_action (run-failure-classification.ts), but the chat error card only mapped ~7 codes to clear copy — everything else fell back to the generic "Task failed" title plus the raw upstream string, so users hitting common failures could not tell the cause or the fix (#895). Extend resolveRunFailureUi to name the failure type and give a one-line fix for eight more high-frequency, clear-root-cause codes, with the raw error preserved in the card's collapsible source area: - AGENT_UNAVAILABLE (CLI not installed) - AGENT_PROMPT_TOO_LARGE (shorten input / new conversation) - AMR_MODEL_UNAVAILABLE (switch model) - TOOL_LOOP_DETECTED (check target, then retry) - ROLE_MARKER_HALLUCINATION (retry recovers) - AGENT_RUNTIME_DEF_INVALID (update / contact support) - RATE_LIMITED (non-antigravity: wait/switch, keeps AMR promotion) - UPSTREAM_UNAVAILABLE (transient, keeps AMR promotion) The six agent-agnostic codes resolve before the amr/antigravity branches so a hosted run also gets the specific guidance. Adds 7 title keys + 8 message keys across all 18 locales and updates amr-guidance unit tests. Co-authored-by: xiaoche-hub <298951296+xiaoche-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent dbc7066 commit af1f2e2

22 files changed

Lines changed: 447 additions & 10 deletions

File tree

apps/web/src/i18n/locales/ar.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const ar: Dict = {
4444
'chat.runError.sourceLabel': 'مصدر الخطأ',
4545
'chat.runError.sourceExpandAria': 'توسيع مصدر الخطأ',
4646
'chat.runError.sourceCollapseAria': 'طي مصدر الخطأ',
47+
'chat.runError.title.cliMissing': 'الوكيل غير مثبَّت',
48+
'chat.runError.title.promptTooLarge': 'الإدخال طويل جدًا',
49+
'chat.runError.title.modelUnavailable': 'النموذج غير متاح',
50+
'chat.runError.title.upstreamUnavailable': 'الخدمة غير متاحة مؤقتًا',
51+
'chat.runError.title.toolLoop': 'عالق في حلقة',
52+
'chat.runError.title.outputInvalid': 'مخرجات النموذج غير صالحة',
53+
'chat.runError.title.runtimeConfig': 'خطأ في الإعداد',
54+
'chat.runError.cliMissingMessage': 'لم يتم العثور على أداة سطر الأوامر لـ {agent}. ثبّتها وتأكد من وجودها في PATH ثم أعد المحاولة.',
55+
'chat.runError.promptTooLargeMessage': 'تجاوزت هذه الجولة حد سياق النموذج. اختصر الطلب أو أزل المرفقات أو ابدأ محادثة جديدة ثم أعد المحاولة.',
56+
'chat.runError.modelUnavailableMessage': 'النموذج المحدد غير متاح أو غير موجود. بدّل إلى نموذج آخر في الإعدادات ثم أعد المحاولة.',
57+
'chat.runError.rateLimitedMessage': 'لقد بلغت حد استخدام خدمة النموذج. انتظر قليلاً ثم أعد المحاولة، أو بدّل إلى نموذج أو خدمة أخرى.',
58+
'chat.runError.upstreamUnavailableMessage': 'خدمة النموذج غير متاحة مؤقتًا — عادةً بسبب عدم استقرار المصدر أو مشكلة في الشبكة/الوكيل. أعد المحاولة بعد قليل.',
59+
'chat.runError.toolLoopMessage': 'كرّر {agent} الإجراء نفسه دون تقدّم فتوقّف. تحقق من الملف أو الأمر المستهدف ثم أعد المحاولة.',
60+
'chat.runError.outputInvalidMessage': 'أنتج النموذج مخرجات غير صالحة وتم إيقاف هذه الجولة. عادةً ما تحل إعادة المحاولة المشكلة.',
61+
'chat.runError.runtimeConfigMessage': 'إعداد وقت التشغيل للوكيل المحدد غير صالح، لذلك تعذّر بدء التشغيل. حدِّث إلى أحدث إصدار أو تواصل مع الدعم.',
4762
'common.cancel': 'إلغاء',
4863
'chat.selectFromLibrary': 'استيراد من المكتبة',
4964
'chat.importFigma': 'استيراد من Figma',

apps/web/src/i18n/locales/de.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const de: Dict = {
4444
'chat.runError.sourceLabel': 'Fehlerquelle',
4545
'chat.runError.sourceExpandAria': 'Fehlerquelle einblenden',
4646
'chat.runError.sourceCollapseAria': 'Fehlerquelle ausblenden',
47+
'chat.runError.title.cliMissing': 'Agent nicht installiert',
48+
'chat.runError.title.promptTooLarge': 'Eingabe zu lang',
49+
'chat.runError.title.modelUnavailable': 'Modell nicht verfügbar',
50+
'chat.runError.title.upstreamUnavailable': 'Dienst vorübergehend nicht verfügbar',
51+
'chat.runError.title.toolLoop': 'In einer Schleife stecken',
52+
'chat.runError.title.outputInvalid': 'Ungültige Modellausgabe',
53+
'chat.runError.title.runtimeConfig': 'Konfigurationsfehler',
54+
'chat.runError.cliMissingMessage': 'Das Kommandozeilen-Tool von {agent} wurde nicht gefunden. Installiere es und stelle sicher, dass es im PATH liegt, und versuche es dann erneut.',
55+
'chat.runError.promptTooLargeMessage': 'Diese Runde hat das Kontextlimit des Modells überschritten. Kürze deine Eingabe, entferne Anhänge oder starte eine neue Unterhaltung und versuche es erneut.',
56+
'chat.runError.modelUnavailableMessage': 'Das ausgewählte Modell ist nicht verfügbar oder existiert nicht. Wechsle in den Einstellungen zu einem anderen Modell und versuche es erneut.',
57+
'chat.runError.rateLimitedMessage': 'Das Nutzungslimit des Modelldienstes wurde erreicht. Warte einen Moment und versuche es erneut oder wechsle zu einem anderen Modell oder Dienst.',
58+
'chat.runError.upstreamUnavailableMessage': 'Der Modelldienst ist vorübergehend nicht verfügbar – meist wegen Upstream-Störungen oder eines Netzwerk-/Proxy-Problems. Versuche es gleich erneut.',
59+
'chat.runError.toolLoopMessage': '{agent} hat dieselbe Aktion ohne Fortschritt wiederholt und wurde gestoppt. Prüfe die Zieldatei oder den Befehl und versuche es erneut.',
60+
'chat.runError.outputInvalidMessage': 'Das Modell hat ungültige Ausgabe erzeugt und diese Runde wurde abgebrochen. Ein erneuter Versuch behebt das meist.',
61+
'chat.runError.runtimeConfigMessage': 'Die Laufzeitkonfiguration des ausgewählten Agents ist ungültig, daher konnte der Lauf nicht starten. Aktualisiere auf die neueste Version oder kontaktiere den Support.',
4762
'common.cancel': 'Abbrechen',
4863
'chat.selectFromLibrary': 'Aus Bibliothek importieren',
4964
'chat.importFigma': 'Aus Figma importieren',

apps/web/src/i18n/locales/en.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const en: Dict = {
4444
'chat.runError.sourceLabel': 'Error source',
4545
'chat.runError.sourceExpandAria': 'Expand error source',
4646
'chat.runError.sourceCollapseAria': 'Collapse error source',
47+
'chat.runError.title.cliMissing': 'Agent not installed',
48+
'chat.runError.title.promptTooLarge': 'Input too long',
49+
'chat.runError.title.modelUnavailable': 'Model unavailable',
50+
'chat.runError.title.upstreamUnavailable': 'Service temporarily unavailable',
51+
'chat.runError.title.toolLoop': 'Stuck in a loop',
52+
'chat.runError.title.outputInvalid': 'Invalid model output',
53+
'chat.runError.title.runtimeConfig': 'Configuration error',
54+
'chat.runError.cliMissingMessage': 'The {agent} command-line tool wasn\'t found. Install it and make sure it\'s on your PATH, then retry.',
55+
'chat.runError.promptTooLargeMessage': 'This turn exceeded the model\'s context limit. Shorten your prompt, remove attachments, or start a new conversation, then retry.',
56+
'chat.runError.modelUnavailableMessage': 'The selected model is unavailable or does not exist. Switch to another model in Settings, then retry.',
57+
'chat.runError.rateLimitedMessage': 'You\'ve hit the model service\'s usage limit. Wait a moment and retry, or switch to another model or service.',
58+
'chat.runError.upstreamUnavailableMessage': 'The model service is temporarily unavailable — usually upstream instability or a network/proxy issue. Retry in a moment.',
59+
'chat.runError.toolLoopMessage': '{agent} kept repeating the same action without progress and was stopped. Check the target file or command, then retry.',
60+
'chat.runError.outputInvalidMessage': 'The model produced invalid output and this turn was interrupted. Retrying usually recovers.',
61+
'chat.runError.runtimeConfigMessage': 'The selected agent\'s runtime configuration is invalid, so the run could not start. Update to the latest version or contact support.',
4762
'common.cancel': 'Cancel',
4863
'chat.selectFromLibrary': 'Import from library',
4964
'chat.importFigma': 'Import from Figma',

apps/web/src/i18n/locales/es-ES.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const esES: Dict = {
4444
'chat.runError.sourceLabel': 'Origen del error',
4545
'chat.runError.sourceExpandAria': 'Mostrar el origen del error',
4646
'chat.runError.sourceCollapseAria': 'Ocultar el origen del error',
47+
'chat.runError.title.cliMissing': 'Agente no instalado',
48+
'chat.runError.title.promptTooLarge': 'Entrada demasiado larga',
49+
'chat.runError.title.modelUnavailable': 'Modelo no disponible',
50+
'chat.runError.title.upstreamUnavailable': 'Servicio temporalmente no disponible',
51+
'chat.runError.title.toolLoop': 'Atascado en un bucle',
52+
'chat.runError.title.outputInvalid': 'Salida del modelo no válida',
53+
'chat.runError.title.runtimeConfig': 'Error de configuración',
54+
'chat.runError.cliMissingMessage': 'No se encontró la herramienta de línea de comandos de {agent}. Instálala y asegúrate de que esté en el PATH, luego reinténtalo.',
55+
'chat.runError.promptTooLargeMessage': 'Este turno superó el límite de contexto del modelo. Acorta tu mensaje, quita adjuntos o inicia una nueva conversación y reinténtalo.',
56+
'chat.runError.modelUnavailableMessage': 'El modelo seleccionado no está disponible o no existe. Cambia a otro modelo en Ajustes y reinténtalo.',
57+
'chat.runError.rateLimitedMessage': 'Has alcanzado el límite de uso del servicio del modelo. Espera un momento y reinténtalo, o cambia a otro modelo o servicio.',
58+
'chat.runError.upstreamUnavailableMessage': 'El servicio del modelo no está disponible temporalmente, normalmente por inestabilidad del proveedor o un problema de red/proxy. Reinténtalo en un momento.',
59+
'chat.runError.toolLoopMessage': '{agent} repitió la misma acción sin avanzar y se detuvo. Revisa el archivo o el comando de destino y reinténtalo.',
60+
'chat.runError.outputInvalidMessage': 'El modelo produjo una salida no válida y este turno se interrumpió. Reintentar suele resolverlo.',
61+
'chat.runError.runtimeConfigMessage': 'La configuración de ejecución del agente seleccionado no es válida, por lo que no se pudo iniciar. Actualiza a la última versión o contacta con soporte.',
4762
'common.cancel': 'Cancelar',
4863
'chat.selectFromLibrary': 'Importar de la biblioteca',
4964
'chat.importFigma': 'Importar de Figma',

apps/web/src/i18n/locales/fa.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const fa: Dict = {
4444
'chat.runError.sourceLabel': 'منبع خطا',
4545
'chat.runError.sourceExpandAria': 'گسترش منبع خطا',
4646
'chat.runError.sourceCollapseAria': 'جمع‌کردن منبع خطا',
47+
'chat.runError.title.cliMissing': 'عامل نصب نشده است',
48+
'chat.runError.title.promptTooLarge': 'ورودی بیش از حد طولانی است',
49+
'chat.runError.title.modelUnavailable': 'مدل در دسترس نیست',
50+
'chat.runError.title.upstreamUnavailable': 'سرویس موقتاً در دسترس نیست',
51+
'chat.runError.title.toolLoop': 'گیرکرده در حلقه',
52+
'chat.runError.title.outputInvalid': 'خروجی نامعتبر مدل',
53+
'chat.runError.title.runtimeConfig': 'خطای پیکربندی',
54+
'chat.runError.cliMissingMessage': 'ابزار خط فرمان {agent} پیدا نشد. آن را نصب کنید و مطمئن شوید در PATH قرار دارد، سپس دوباره تلاش کنید.',
55+
'chat.runError.promptTooLargeMessage': 'این نوبت از محدودیت زمینه مدل فراتر رفت. پرامپت را کوتاه کنید، پیوست‌ها را کم کنید یا گفت‌وگوی جدیدی شروع کنید و دوباره تلاش کنید.',
56+
'chat.runError.modelUnavailableMessage': 'مدل انتخاب‌شده در دسترس نیست یا وجود ندارد. در تنظیمات به مدل دیگری تغییر دهید و دوباره تلاش کنید.',
57+
'chat.runError.rateLimitedMessage': 'به محدودیت استفاده از سرویس مدل رسیده‌اید. کمی صبر کنید و دوباره تلاش کنید، یا به مدل یا سرویس دیگری تغییر دهید.',
58+
'chat.runError.upstreamUnavailableMessage': 'سرویس مدل موقتاً در دسترس نیست — معمولاً به دلیل بی‌ثباتی سرویس بالادستی یا مشکل شبکه/پروکسی. کمی بعد دوباره تلاش کنید.',
59+
'chat.runError.toolLoopMessage': '{agent} همان عمل را بدون پیشرفت تکرار کرد و متوقف شد. فایل یا فرمان هدف را بررسی کنید و دوباره تلاش کنید.',
60+
'chat.runError.outputInvalidMessage': 'مدل خروجی نامعتبری تولید کرد و این نوبت قطع شد. معمولاً تلاش دوباره مشکل را حل می‌کند.',
61+
'chat.runError.runtimeConfigMessage': 'پیکربندی زمان‌اجرای عامل انتخاب‌شده نامعتبر است، بنابراین اجرا آغاز نشد. به آخرین نسخه به‌روزرسانی کنید یا با پشتیبانی تماس بگیرید.',
4762
'common.cancel': 'لغو',
4863
'chat.selectFromLibrary': 'وارد کردن از کتابخانه',
4964
'chat.importFigma': 'وارد کردن از Figma',

apps/web/src/i18n/locales/fr.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const fr: Dict = {
4444
'chat.runError.sourceLabel': 'Source de l’erreur',
4545
'chat.runError.sourceExpandAria': 'Afficher la source de l’erreur',
4646
'chat.runError.sourceCollapseAria': 'Masquer la source de l’erreur',
47+
'chat.runError.title.cliMissing': 'Agent non installé',
48+
'chat.runError.title.promptTooLarge': 'Entrée trop longue',
49+
'chat.runError.title.modelUnavailable': 'Modèle indisponible',
50+
'chat.runError.title.upstreamUnavailable': 'Service temporairement indisponible',
51+
'chat.runError.title.toolLoop': 'Bloqué dans une boucle',
52+
'chat.runError.title.outputInvalid': 'Sortie du modèle invalide',
53+
'chat.runError.title.runtimeConfig': 'Erreur de configuration',
54+
'chat.runError.cliMissingMessage': 'L’outil en ligne de commande de {agent} est introuvable. Installez-le et assurez-vous qu’il figure dans le PATH, puis réessayez.',
55+
'chat.runError.promptTooLargeMessage': 'Ce tour a dépassé la limite de contexte du modèle. Raccourcissez votre message, retirez des pièces jointes ou démarrez une nouvelle conversation, puis réessayez.',
56+
'chat.runError.modelUnavailableMessage': 'Le modèle sélectionné est indisponible ou inexistant. Passez à un autre modèle dans les Paramètres, puis réessayez.',
57+
'chat.runError.rateLimitedMessage': 'Vous avez atteint la limite d’utilisation du service de modèle. Patientez un instant et réessayez, ou changez de modèle ou de service.',
58+
'chat.runError.upstreamUnavailableMessage': 'Le service de modèle est temporairement indisponible, généralement en raison d’une instabilité en amont ou d’un problème réseau/proxy. Réessayez dans un instant.',
59+
'chat.runError.toolLoopMessage': '{agent} a répété la même action sans progresser et a été arrêté. Vérifiez le fichier ou la commande cible, puis réessayez.',
60+
'chat.runError.outputInvalidMessage': 'Le modèle a produit une sortie invalide et ce tour a été interrompu. Réessayer suffit généralement.',
61+
'chat.runError.runtimeConfigMessage': 'La configuration d’exécution de l’agent sélectionné est invalide, l’exécution n’a donc pas pu démarrer. Mettez à jour vers la dernière version ou contactez le support.',
4762
'common.cancel': 'Annuler',
4863
'chat.selectFromLibrary': 'Importer depuis la bibliothèque',
4964
'chat.importFigma': 'Importer depuis Figma',

apps/web/src/i18n/locales/hu.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const hu: Dict = {
4444
'chat.runError.sourceLabel': 'Hibaforrás',
4545
'chat.runError.sourceExpandAria': 'Hibaforrás kibontása',
4646
'chat.runError.sourceCollapseAria': 'Hibaforrás összecsukása',
47+
'chat.runError.title.cliMissing': 'Az ügynök nincs telepítve',
48+
'chat.runError.title.promptTooLarge': 'Túl hosszú bemenet',
49+
'chat.runError.title.modelUnavailable': 'A modell nem érhető el',
50+
'chat.runError.title.upstreamUnavailable': 'A szolgáltatás átmenetileg nem érhető el',
51+
'chat.runError.title.toolLoop': 'Végtelen ciklusban ragadt',
52+
'chat.runError.title.outputInvalid': 'Érvénytelen modellkimenet',
53+
'chat.runError.title.runtimeConfig': 'Konfigurációs hiba',
54+
'chat.runError.cliMissingMessage': 'A(z) {agent} parancssori eszköze nem található. Telepítsd, és győződj meg róla, hogy szerepel a PATH-ban, majd próbáld újra.',
55+
'chat.runError.promptTooLargeMessage': 'Ez a kör túllépte a modell kontextushatárát. Rövidítsd le a promptot, távolíts el mellékleteket, vagy indíts új beszélgetést, majd próbáld újra.',
56+
'chat.runError.modelUnavailableMessage': 'A kiválasztott modell nem érhető el vagy nem létezik. Válts át másik modellre a Beállításokban, majd próbáld újra.',
57+
'chat.runError.rateLimitedMessage': 'Elérted a modellszolgáltatás használati korlátját. Várj egy kicsit, és próbáld újra, vagy válts másik modellre vagy szolgáltatásra.',
58+
'chat.runError.upstreamUnavailableMessage': 'A modellszolgáltatás átmenetileg nem érhető el — általában upstream instabilitás vagy hálózati/proxy probléma miatt. Próbáld újra egy pillanat múlva.',
59+
'chat.runError.toolLoopMessage': 'A(z) {agent} ugyanazt a műveletet ismételte előrehaladás nélkül, ezért leállt. Ellenőrizd a célfájlt vagy parancsot, majd próbáld újra.',
60+
'chat.runError.outputInvalidMessage': 'A modell érvénytelen kimenetet állított elő, és ez a kör megszakadt. Az újrapróbálkozás általában megoldja.',
61+
'chat.runError.runtimeConfigMessage': 'A kiválasztott ügynök futásidejű konfigurációja érvénytelen, ezért a futtatás nem indulhatott el. Frissíts a legújabb verzióra, vagy fordulj a támogatáshoz.',
4762
'common.cancel': 'Mégse',
4863
'chat.selectFromLibrary': 'Importálás a könyvtárból',
4964
'chat.importFigma': 'Importálás Figmából',

apps/web/src/i18n/locales/id.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ export const id: Dict = {
4444
'chat.runError.sourceLabel': 'Sumber kesalahan',
4545
'chat.runError.sourceExpandAria': 'Perluas sumber kesalahan',
4646
'chat.runError.sourceCollapseAria': 'Ciutkan sumber kesalahan',
47+
'chat.runError.title.cliMissing': 'Agen belum terpasang',
48+
'chat.runError.title.promptTooLarge': 'Input terlalu panjang',
49+
'chat.runError.title.modelUnavailable': 'Model tidak tersedia',
50+
'chat.runError.title.upstreamUnavailable': 'Layanan sementara tidak tersedia',
51+
'chat.runError.title.toolLoop': 'Terjebak dalam perulangan',
52+
'chat.runError.title.outputInvalid': 'Output model tidak valid',
53+
'chat.runError.title.runtimeConfig': 'Kesalahan konfigurasi',
54+
'chat.runError.cliMissingMessage': 'Alat baris perintah {agent} tidak ditemukan. Pasang dan pastikan ada di PATH, lalu coba lagi.',
55+
'chat.runError.promptTooLargeMessage': 'Giliran ini melebihi batas konteks model. Perpendek prompt, hapus lampiran, atau mulai percakapan baru, lalu coba lagi.',
56+
'chat.runError.modelUnavailableMessage': 'Model yang dipilih tidak tersedia atau tidak ada. Beralih ke model lain di Pengaturan, lalu coba lagi.',
57+
'chat.runError.rateLimitedMessage': 'Anda telah mencapai batas penggunaan layanan model. Tunggu sebentar dan coba lagi, atau beralih ke model atau layanan lain.',
58+
'chat.runError.upstreamUnavailableMessage': 'Layanan model sementara tidak tersedia — biasanya karena ketidakstabilan upstream atau masalah jaringan/proxy. Coba lagi sebentar lagi.',
59+
'chat.runError.toolLoopMessage': '{agent} terus mengulang tindakan yang sama tanpa kemajuan dan dihentikan. Periksa file atau perintah target, lalu coba lagi.',
60+
'chat.runError.outputInvalidMessage': 'Model menghasilkan output tidak valid dan giliran ini terhenti. Mencoba lagi biasanya memulihkannya.',
61+
'chat.runError.runtimeConfigMessage': 'Konfigurasi runtime agen yang dipilih tidak valid, sehingga eksekusi tidak dapat dimulai. Perbarui ke versi terbaru atau hubungi dukungan.',
4762
'common.cancel': 'Batal',
4863
'chat.selectFromLibrary': 'Impor dari pustaka',
4964
'chat.importFigma': 'Impor dari Figma',

0 commit comments

Comments
 (0)