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:29)

Ruben Lütke788d16ba0fb2
diff --git a/jarvis/harness/screenshot_only_loop.py b/jarvis/harness/screenshot_only_loop.py
index 44bda3ad4c..145f43e4c8 100644
--- a/jarvis/harness/screenshot_only_loop.py
+++ b/jarvis/harness/screenshot_only_loop.py
@@ -34,6 +34,7 @@ Termination paths:
- "done" -> exit_code 0
- "fail" -> exit_code 5
- parse error -> exit_code 2
+ - no vision provider-> exit_code 3 (provider chain exhausted; keyless / out-of-credit / no-vision)
- step budget -> exit_code 4
- tool failure -> exit_code 8
- observe failure -> exit_code 1
@@ -160,12 +161,30 @@ _TIMEOUT_EXIT_CODE = 124
_FAIL_EXIT_CODE = 5
_BUDGET_EXIT_CODE = 4
_PARSE_EXIT_CODE = 2
+_NO_PROVIDER_EXIT_CODE = 3 # vision-provider chain exhausted (no screen-capable brain)
_TOOL_EXIT_CODE = 8
_OBSERVE_EXIT_CODE = 1
_ELEVATION_EXIT_CODE = 9 # waited for an OS elevation confirmation, none came
_CANCEL_EXIT_CODE = 130
+def _llm_failure_exit_code(exc: BaseException) -> int:
+ """Map a giving-up brain failure to the right exit code.
+
+ An exhausted vision-provider chain (:class:`CUNoCapableProviderError`) is an
+ account/credential fact the user can fix in-app, so it gets its own honest
+ exit code (3 → a "no screen-capable model; check your keys/credit" readback).
+ Any other brain failure — a genuine parse error, a transient provider hiccup
+ that simply never recovered — stays the generic parse/"confused" code (2).
+ Keeping them apart is what stopped the user hearing "couldn't get a valid
+ screen-control response" when the real cause was a dead provider chain
+ (live forensic 2026-06-30).
+ """
+ if isinstance(exc, CUNoCapableProviderError):
+ return _NO_PROVIDER_EXIT_CODE
+ return _PARSE_EXIT_CODE
+
+
def _wayland_block_message() -> str | None:
"""Honest-refusal reason when CU cannot run on this session, else ``None``.
@@ -1644,7 +1663,7 @@ async def _call_brain(
)
continue
- raise CULoopError(
+ raise CUNoCapableProviderError(
selector.error_message(
images_attached=images_attached,
attempted=attempted,
@@ -4736,12 +4755,17 @@ async def _run_screenshot_loop(
step_idx, llm_failures, _MAX_LLM_FAILURES, exc,
)
if llm_failures >= _MAX_LLM_FAILURES:
+ # Tell apart an exhausted vision-provider chain (exit 3 —
+ # account/credential fact, fix keys/credit) from a generic
+ # model/parse failure (exit 2). Live forensic 2026-06-30: a
+ # dead chain was reported as exit 2 and the user heard the
+ # misleading "couldn't get a valid screen-control response".
yield _final(
stderr=(
f"[cu] giving up after {llm_failures} model "
f"failures (last: {exc})\n"
),
- exit_code=_PARSE_EXIT_CODE,
+ exit_code=_llm_failure_exit_code(exc),
)
return
await _profile_phase(
diff --git a/jarvis/voice/action_phrases.py b/jarvis/voice/action_phrases.py
index 37338ef883..814299cf57 100644
--- a/jarvis/voice/action_phrases.py
+++ b/jarvis/voice/action_phrases.py
@@ -45,9 +45,9 @@ _PHRASES: dict[str, dict[str, str]] = {
# 241a1984). ``{detail}`` is the verifier's own sentence (already in the
# turn's observed language, same as the failure-reason forwarding path).
"cu_done_detail": {
- "de": "Erledigt — {detail}", # i18n-allow
- "en": "Done — {detail}",
- "es": "Listo — {detail}",
+ "de": "Erledigt. {detail}", # i18n-allow
+ "en": "Done. {detail}",
+ "es": "Listo. {detail}",
},
"cu_failed": {
"de": "Das am Bildschirm hat nicht geklappt.", # i18n-allow
@@ -71,7 +71,8 @@ _PHRASES: dict[str, dict[str, str]] = {
# didn't work on screen: exit 5" and the user asked "what is the exit file?".
# Exit-code semantics are documented at the top of
# jarvis/harness/screenshot_only_loop.py (5=`fail`, 1=observe, 2=parse,
- # 4=step budget, 8=tool failure, 9=elevation unmet, 124=timeout, 130=cancel).
+ # 3=no vision-capable provider reachable, 4=step budget, 8=tool failure,
+ # 9=elevation unmet, 124=timeout, 130=cancel).
"cu_exit_gave_up": { # exit 5 — the model's `fail` action
"de": "Ich habe es am Bildschirm versucht, aber nicht hinbekommen.", # i18n-allow
"en": "I tried it on screen but couldn't get it done.",
@@ -97,7 +98,8 @@ _PHRASES: dict[str, dict[str, str]] = {
# 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
+ "Bitte pruefe deine API-Schluessel oder dein Guthaben " # i18n-allow
+ "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. "
@@ -121,7 +123,7 @@ _PHRASES: dict[str, dict[str, str]] = {
},
"cu_exit_needs_elevation": { # exit 9 — waited for admin confirmation, none came
"de": "Ich habe auf die Administrator-Bestaetigung gewartet, aber es kam " # i18n-allow
- "keine -- ich habe gestoppt.", # i18n-allow
+ "keine, also habe ich gestoppt.", # i18n-allow
"en": "I waited for the administrator confirmation, but none came, so I stopped.",
"es": "Esperé la confirmación de administrador, pero no llegó, así que me detuve.",
},
@@ -133,10 +135,10 @@ _PHRASES: dict[str, dict[str, str]] = {
},
# Computer-use dispatch — the immediate optimistic ACK.
"cu_dispatch_ack": {
- "de": "Mach ich — ich erledige das direkt am Bildschirm " # i18n-allow
+ "de": "Mach ich. Ich erledige das direkt am Bildschirm " # i18n-allow
"und sage Bescheid, sobald es fertig ist.", # i18n-allow
- "en": "On it — I'll handle that on screen and let you know when it's done.",
- "es": "Voy — lo hago directamente en la pantalla y te aviso cuando termine.",
+ "en": "On it. I'll handle that on screen and let you know when it's done.",
+ "es": "Voy. Lo hago directamente en la pantalla y te aviso cuando termine.",
},
# Computer-use pause: an OS elevation prompt (Windows Secure Desktop & co.)
# is up. A non-elevated process can neither see nor click it (UIPI), so we
@@ -157,20 +159,20 @@ _PHRASES: dict[str, dict[str, str]] = {
# to take over, polls until the screen clears, then resumes. Phrased generally
# so it fits login, code-entry and captcha alike.
"cu_awaiting_human": {
- "de": "Dieser Schritt braucht dich -- bitte melde dich an oder loese " # i18n-allow
+ "de": "Dieser Schritt braucht dich, bitte melde dich an oder loese " # i18n-allow
"die Bestaetigung, dann mache ich weiter.", # i18n-allow
- "en": "This step needs you — please sign in or complete the "
+ "en": "This step needs you, please sign in or complete the "
"verification, then I'll keep going.",
- "es": "Este paso te necesita — inicia sesión o completa la "
+ "es": "Este paso te necesita, inicia sesión o completa la "
"verificación y continúo.",
},
# Cost / budget guards on the computer-use branch.
"cost_cooldown": {
- "de": "Cost-Cooldown aktiv — Tagesbudget erschoepft. " # i18n-allow
+ "de": "Cost-Cooldown aktiv, das Tagesbudget ist erschoepft. " # i18n-allow
"Neue Anfragen werden erst nach dem Cooldown-Ende bearbeitet.", # i18n-allow
- "en": "Cost cooldown active — the daily budget is used up. "
+ "en": "Cost cooldown active, the daily budget is used up. "
"New requests resume once the cooldown ends.",
- "es": "Enfriamiento de costes activo — el presupuesto diario se agotó. "
+ "es": "Enfriamiento de costes activo, el presupuesto diario se agotó. "
"Las nuevas solicitudes se reanudan al terminar el enfriamiento.",
},
"task_budget": {
diff --git a/reporttutorialpickupprompt (1).md b/reporttutorialpickupprompt (1).md
new file mode 100644
index 0000000000..c2328ece87
--- /dev/null
+++ b/reporttutorialpickupprompt (1).md
@@ -0,0 +1,56 @@
+# Pick-up: Report-Tutorial — Secrets/PII review (LOCAL)
+
+You are Claude Code running in the LOCAL, full Personal Jarvis working tree
+(the real, non-depersonalized repo — CLAUDE.md §2 privacy gate applies).
+
+A parallel cloud session was asked to review the "Report-Tutorial" for secrets
+and "things that shouldn't be in there" (real name, personal paths, machine/user
+IDs, internal project ids, API keys/tokens — the §2 categories). It runs on a
+DEPERSONALIZED public snapshot, so it could NOT identify which artifact the
+"Report-Tutorial" is — the relevant files aren't in the public snapshot.
+
+YOUR JOB: investigate THIS local directory (read-only) and answer every question
+below. Save the answers as a Markdown list to
+`docs/handoffs/report-tutorial-review-answers.md` — each question as a heading,
+the answer beneath, with `path:line` evidence where relevant. Do NOT modify,
+commit, push, or run the public ship gate. Artifacts stay English (§1).
+
+## A — Identify the artifact
+1. What exactly is the "Report-Tutorial"? Give the exact path(s).
+2. Is it a doc, a generated report, the onboarding tutorial, a feature that
+ PRODUCES reports, or something else? Describe in one line.
+3. Is it git-tracked, untracked, or generated at runtime?
+4. Format/type: Markdown, code, HTML, screenshots, video, JSON output?
+5. When was it last modified, and is it hand-written or generated?
+
+## B — Publication intent
+6. Is it meant to ship to the PUBLIC repo (PersonalJarvis/PersonalJarvis) or
+ stay private/local only?
+7. Is it on the distribution denylist or in .gitignore?
+
+## C — Leak surface (the actual review)
+8. Does it embed real data: logs, transcripts, console output, screenshots,
+ file paths, example API responses, mission/worker outputs?
+9. Search it for each of these and report every hit with path:line:
+ - maintainer real name (Lütke / Luetke + first name)
+ - personal email(s) (e.g. *@gmail.com that isn't an intentional contact)
+ - C:\Users\<name> or other personal filesystem paths
+ - machine/user identifiers, Windows SIDs (S-1-5-21-...)
+ - internal project ids
+ - private IPs (192.168.* / 10.* / 172.16-31.*)
+ - API keys / tokens / private-key blocks / JWTs
+10. Any screenshots/images: do they show secrets, tokens, the personal desktop,
+ window titles, file paths, or other identifying detail?
+11. Any embedded URLs/IDs (YouTube, Discord invite, Telegram, gist, internal
+ hostnames): intended-public or accidentally-private?
+
+## D — Scope
+12. Is this one file or a whole directory/section? List everything in scope.
+13. Does the artifact contain anything the pii-scrub.tsv manifest would mask?
+ (Run the local docs_privacy_scan.py / ship gate scanner against it and paste
+ the result — it works locally because the manifest is present here.)
+14. Was there a specific recent change/commit that triggered this concern?
+
+## Output
+Write `docs/handoffs/report-tutorial-review-answers.md` as a Markdown list with
+all answers + evidence. Then tell Ruben it's ready so he can send it back.
diff --git a/tests/unit/voice/test_action_phrases.py b/tests/unit/voice/test_action_phrases.py
index 20510d7a24..b92844306a 100644
--- a/tests/unit/voice/test_action_phrases.py
+++ b/tests/unit/voice/test_action_phrases.py
@@ -223,6 +223,32 @@ class TestCuFailureReadback:
assert reason in out
+class TestNoHardcodedDashes:
+ """A fixed phrase must NOT carry an em dash, en dash, or a " -- " dash-aside.
+
+ These phrases run OFF the LLM. The announcement path humanizes + scrubs them
+ (the 2026-06-29 em-dash -> comma scrub), but our OWN canned strings must not
+ RELY on that downstream scrubber to honor the persona's "never use the em
+ dash or dash-asides" rule — defense in depth. Live forensic 2026-06-30: the
+ CU dispatch ACK "Mach ich — ich erledige das ..." was shown/spoken with a
+ hard em dash (spoken twice verbatim), and the persona explicitly forbids it
+ because a dash renders as a hard stop / trailing half-sentence in TTS.
+ """
+
+ def test_no_phrase_contains_a_dash_aside(self) -> None:
+ from jarvis.voice.action_phrases import _PHRASES
+
+ offenders: list[str] = []
+ for key, variants in _PHRASES.items():
+ for lang, template in variants.items():
+ if "—" in template or "–" in template or " -- " in template:
+ offenders.append(f"{key}/{lang}: {template!r}")
+ assert not offenders, (
+ "fixed phrases must not carry an em/en dash or ' -- ' aside "
+ "(use a comma, full stop, or connective):\n" + "\n".join(offenders)
+ )
+
+
class TestNoCapableProviderPhrase:
"""Exit 3 == the Computer-Use vision-provider chain was exhausted: NO
screen-capable AI model was reachable (every candidate keyless / depleted /