Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

chore: auto-save WIP via Claude stop-hook safety net (2026-06-30 18:14)

Ruben Lütke9f1672e03c75
diff --git a/jarvis/voice/action_phrases.py b/jarvis/voice/action_phrases.py
index 06f689fab5..37338ef883 100644
--- a/jarvis/voice/action_phrases.py
+++ b/jarvis/voice/action_phrases.py
@@ -87,6 +87,22 @@ _PHRASES: dict[str, dict[str, str]] = {
"en": "I couldn't get a valid screen-control response, so I stopped.",
"es": "No pude obtener una respuesta valida para controlar la pantalla, asi que me detuve.",
},
+ # exit 3 — the vision-provider chain was EXHAUSTED: no screen-capable AI model
+ # was reachable (every candidate keyless / out-of-credit / rate-limited /
+ # no-vision). This is NOT the model "getting confused" (exit 2); it is an
+ # account/credential fact the user can fix in-app, so the phrase is honest and
+ # ACTIONABLE (points at keys/credit/settings) instead of the misleading
+ # "couldn't get a valid response". Live forensic 2026-06-30: the user's whole
+ # CU chain was dead (Gemini credits depleted, Claude 502, OpenAI no key,
+ # OpenRouter model no-vision) yet they heard the generic exit-2 phrase.
+ "cu_exit_no_provider": { # exit 3 — no vision-capable provider reachable
+ "de": "Ich habe gerade kein KI-Modell, das den Bildschirm sehen kann. " # i18n-allow
+ "Bitte pruefe deine API-Schluessel oder dein Guthaben in den Einstellungen.", # i18n-allow
+ "en": "I don't have an AI model that can see the screen right now. "
+ "Please check your API keys or your credit in settings.",
+ "es": "Ahora mismo no tengo un modelo de IA que pueda ver la pantalla. "
+ "Revisa tus claves de API o tu saldo en los ajustes.",
+ },
"cu_exit_too_many_steps": { # exit 4 — step budget exhausted
"de": "Es hat am Bildschirm zu viele Schritte gebraucht, ich habe " # i18n-allow
"aufgehoert.", # i18n-allow
@@ -258,6 +274,7 @@ CU_CANCEL_EXIT_CODE: int = 130
_EXIT_CODE_PHRASE: dict[int, str] = {
1: "cu_exit_no_view",
2: "cu_exit_confused",
+ 3: "cu_exit_no_provider",
4: "cu_exit_too_many_steps",
5: "cu_exit_gave_up",
8: "cu_exit_action_failed",
diff --git a/tests/unit/voice/test_action_phrases.py b/tests/unit/voice/test_action_phrases.py
index 795dce5cc2..20510d7a24 100644
--- a/tests/unit/voice/test_action_phrases.py
+++ b/tests/unit/voice/test_action_phrases.py
@@ -223,6 +223,38 @@ class TestCuFailureReadback:
assert reason in out
+class TestNoCapableProviderPhrase:
+ """Exit 3 == the Computer-Use vision-provider chain was exhausted: NO
+ screen-capable AI model was reachable (every candidate keyless / depleted /
+ rate-limited / no-vision). Live forensic 2026-06-30: the user heard the
+ generic "couldn't get a valid screen-control response" (exit 2) while the
+ real cause was a dead provider chain (Gemini credits depleted, Claude 502,
+ OpenAI no key, OpenRouter model no-vision). Exit 3 must be an HONEST,
+ ACTIONABLE sentence — distinct from the misleading exit-2 parse phrase — so
+ the user knows to fix keys/credit, not that the model "got confused".
+ """
+
+ def test_exit_3_is_the_no_provider_phrase(self) -> None:
+ for lang in ("de", "en", "es"):
+ out = cu_failure_readback(lang, error="exit 3", exit_code=3)
+ assert not _EXIT_TOKEN_RE.search(out), out
+ assert out == action_phrase("cu_exit_no_provider", lang)
+ # distinct from the exit-2 parse phrase (the misleading one).
+ assert out != cu_failure_readback(lang, error="exit 2", exit_code=2)
+
+ def test_exit_3_is_actionable_about_keys_or_credit(self) -> None:
+ en = action_phrase("cu_exit_no_provider", "en")
+ assert len(en) > 10
+ assert "screen" in en.lower()
+ # points the user at the real fix: keys / credit / settings.
+ assert any(w in en.lower() for w in ("key", "credit", "settings"))
+
+ def test_exit_3_unknown_language_falls_back_to_german(self) -> None:
+ assert action_phrase("cu_exit_no_provider", "fr") == action_phrase(
+ "cu_exit_no_provider", "de"
+ )
+
+
class TestElevationPausePhrases:
"""Phrases for the UAC / privilege-prompt pause-and-resume flow.